how do you create a numbered list in html
Answers
Creating a numbered list in HTML:
For creating a numbered lists in HTML generally <ol> tag is used. Tag <ol> describes the ordered list. Inside the body of this tag, <li> tag is used to make a list.
Here is a example of ordered list:
<ol>
<li> This is number 1 </li>
<li> This is number 2 </li>
<li> This is number 3 </li>
<li> This is number 4 </li>
</ol>
Output:
- This is number 1
- This is number 2
- This is number 3
- This is number 4
- For making ordered lists, <ol> tag is used. Using <ol> tag gives us output in ordered and numbered list type. For making lists, In this also the <li> is used.
- For making unordered lists, The tag <ul> is used. This tag is used for getting unordered and un-numbered lists. This tag too uses <li> for making lists.
Here is an example of unordered list:
<ul>
<li>Internet</li>
<li>Mobile</li>
<li>Laptop</li>
<li> Computer</li>
</ul>
Output:
- Internet
- Mobile
- Laptop
- Computer
What is HTML:
HTML(Hyper text Markup Language) is a standard Markup language generally used for creating web pages and websites front layer. HTML is assisted with the programming languages CSS and JavaScript to display the documents on web browser. HTML is one of the easiest programming language that can be useful in creating web pages and designing websites with the front and back end layer.
- HTML latest version is "HTML 5". HTML is a programming language by "WHATWG". HTML is a type of document file language which helps us to display our documents and files on web-browser in the form of Website.
- Along with HTML, CSS and JavaScript are also used to make the look and functions of site better.
HTML Tags:
There are three main types of Tags in HTML; Opening Tag, Closing tag and Content tag. Each tag have it's different functions and methods. This all tags helps us to run our program and documents without any error and correctly.
- HTML program is started using <HTML> tag. This tag indicates that, this is HTML code or text to be displayed in browser.
- Second tag in any HTML document is <Head> tag. This tag represents the title of the webpage.
- The most important tag; Body tag <body>; Indicates the all visible content on the web. This tag represents the all sub-tags on the webpages.
- <p> - This tag represents the Paragraph on the webpage.
- <article> - This tag represents that, this is Article on the webpage.
- <h1> - This tag represents the heading; <h2> represents the subheading and so go on.
- <b> - Defines the Bold text.
- <i> - Defines the italic text.
- <u> - Underline the text on the webpage.
- <table> - To create a table like excel on website.
Advantages of using HTML:
- HTML helps us to show our documents and files on the website.
- HTML is a very easy language, so anyone can learn it and can do job.
- HTML is easy language to program. This helps programmers to write the code for their websites without any error and without any mistakes.
- HTML is free to use and easy to learn.
- All browsers support HTML language.
- It is simple to edit HTML documents.
- HTML is a lightweight and it is basic of all programming languages.
Disadvantages of HTML:
- Errors made while programming HTML can be very costly.
- If we have to create dynamic pages, then HTML is not useful their.
- There are some security issues using HTML language.
- We have to write lot of codes to make simple web pages.
- All browsers don't render the HTML codes same.