10 ListsContents Show
<li>: The List Item elementThe <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
Table of ContentsPart I Chapter 1 Section A Section B Chapter 2 Section A Section B Part II Chapter 3 Section A Section B Chapter 4 Section A Section Band which would look like this when marked up: Table of ContentsPart IChapter 1Section ASection BChapter 2Section A Section BPart IIChapter 3Section A Section BChapter 4Section A Section BNote: The above hyperlinks are not active; they are for demonstration only. To see how the above list also could be generated using a table, go to the example section of Tables. How to create hyperlinks will be shown in the section on Hyperlinks. Proceed to Graphic Images Return to Main Page of Ted�s HTML Tutorial Copyright � 1998� by Ted M. Montgomery. All rights reserved.Container and Empty Tags in HTMLHTML uses predefined tags that tell the browser how to display the content. Tags are nothing but some instructions that are enclosed in angle braces(i.e., <>). Tags are used in many places of the webpage but many users are often confused about some tags whether it is a container or an empty tag. They get this confusion because they don’t know for what tag there should be an ending tag along with the opening tag or not. There are two types of tags in HTML:
Now, let us see the definitions and examples of the most commonly used HTML container and empty tags. Container tagsContainer tags are generally divided into three parts, i.e., opening tag, content(which will display on the browser), and closing tag. In the content part, they can also contain some other tags. These opening and closing tags are used in pairs which are start tag and end tag, which is often called ON and OFF tags. If you forget to close the container tag, the browser applies the effect of the opening tag until the end of the page. So be careful while working with container tags. The majority of tags present in HTML are container tags. Syntax:
Some commonly used container tags are: 1. Essential Tags: Following tags are used to create the structure of the webpage:
2. Headings: Following tags are used for headings:
3. Text formatters: Following tags are used for text formatting:
4. HyperLinks: Following tag is used to define a hyperlink in the webpage:
5. Button tag: Following tag is used to create a click button:
6. Division tag: Following tag is used to create a division:
7. Iframe tag: Following tag is used for inline framing:
8. Navigation tag: Following tag is used to set a navigation link:
9. Script tag: Following tag is used to add JavaScript code to the webpage:
10. Lists: Following tags are used to write data in the form of ordered and unordered lists:
Empty TagsThe tags that do not contain any closing tags are known as empty tags. Empty tags contain only the opening tag but they perform some action in the webpage. Syntax:
Some commonly used empty tags are:
Example: This example demonstrates the use of container and empty tags: HTML
Output:
Article Tags :
class 6 HTML School Learning School Programming
HTML-Tags Practice Tags :
HTML HTML <ul> Tag
❮
Reference
❯
ExampleAn unordered HTML list:
<ul>
Try it Yourself »
More "Try it Yourself" examples below. HTML <li> Tag
❮
Reference
❯
ExampleOne ordered (<ol>) and one unordered (<ul>) HTML list:
<ol>
Try it Yourself »
More "Try it Yourself" examples below. |