Which of the following pair of tags is used are used to provide heading to the list?

Common HTML Tags

The following are some facts about HTML tags (plus a few facts about XHTML tags too):

  • Web pages are just plain text. You can view or edit the source code using any text editor.
  • "Tags" provide web browsers with instructions about the web page, such as where to display images, and how the document is structured.
  • Tags are always enclosed in angle brackets: < >.
  • Tags are comprised of elements and attributes. An element is an object on a page (such as a heading, paragraph, or image), and attributes are qualities that describe that element (such as width and height).
  • Tags usually travel in pairs. An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text as a paragraph, you would open the paragraph with an opening paragraph tag <p> and close it with a closing paragraph tag </p> (closing tags always proceed the element with a /).
  • A few tags are called non-container tags, because they don't contain any content - they stand alone. Examples are images and line breaks. XHTML is more strict than HTML, and requires that all open tags must be closed, even if they're not container tags. Therefore, non-container tags end in />. For example, the tag for a line break is <br />. HTML does not have this same requirement, but it's a good habit to get into in case you ever need to code in XHTML.
  • Tags in HTML are not case sensitive, but in XHTML all tags must be in lower case. Even when coding in HTML, you should get in the habit of writing tags in lower case.
  • White space is ignored by web browsers. So, if you hit the space bar multiple times within a document, only one of those spaces will actually be displayed by the browser.
  • Tags can be nested. For example:

    <div><p>This paragraph is nested inside a division</p></div>

    Note that the order of nested tags is important: The container tags surrounding any content should be symmetrical.

HTML Tags

This is a list of tags used in the HTML language. Each tag starts with a tag opener (a less than sign) and ends with a tag closer (a greater than sign). Many tags have corresponding closing tags which identical except for a slash after the tag opener. (For example, the TITLE tag).

Some tags take parameters, called attributes. The attributes are given after the tag, separated by spaces. Certain attributes have an effect simply by their presence, others are followed by an equals sign and a value. (See the Anchor tag, for example). The names of tags and attributes are not case sensitive: they may be in lower, upper, or mixed case with exactly the same meaning. (In this document they are generally represented in upper case.)

Currently HTML documents are transmitted without the normal SGML framing tags, but if these are included parsers will ignore them.

10 Lists

Contents

  1. Introduction to lists
  2. Unordered lists (UL), ordered lists (OL), and list items (LI)
  3. Definition lists: the DL, DT, and DD elements
    1. Visual rendering of lists
  4. The DIR and MENU elements

What are HTML Elements?

Elements are the building blocks of HTML that describe the structure and content of a web page. They are the “Markup” part of HyperText Markup Language (HTML).

HTML syntax uses the angle brackets (”<” and ”>”) to hold the name of an HTML element. Elements usually have an opening tag and a closing tag, and give information about the content they contain. The difference between the two is that the closing tag has a forward slash.

Let's look at some specific examples of HTML tags.

HTML elements reference

This page lists all the HTML elements, which are created using tags.

They are grouped by function to help you find what you have in mind easily. An alphabetical list of all elements is provided in the sidebar on every element's page as well as this one.

Note: For more information about the basics of HTML elements and attributes, see the section on elements in the Introduction to HTML article.

<li>: The List Item element

The <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.

Content categoriesPermitted contentTag omissionPermitted parentsImplicit ARIA rolePermitted ARIA rolesDOM interface
None.
Flow content.
The end tag can be omitted if the list item is immediately followed by another <li> element, or if there is no more content in its parent element.
An <ul>, <ol>, or <menu> element. Though not a conforming usage, the obsolete <dir> can also be a parent.
listitem when child of an ol, ul or menu
menuitem, menuitemcheckbox, menuitemradio, option, none, presentation, radio, separator, tab, treeitem
HTMLLIElement

Category: HTML Tags

A complete list (and brief description) of every tag in the HTML, including the latest additions in HTML5.

Click through to view details, code samples and more for each tag.

Be sure to check out our HTML attributes section, too.

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more

Video liên quan

Postingan terbaru

LIHAT SEMUA