Common HTML Tags
Examples of Commonly Used HTML Tags
| Tag | Purpose |
|---|---|
| <html> | Represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element. |
| <head> | Contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets. |
| <link> | Specifies relationships between the current document and an external resource. This element is most commonly used to link to CSS. |
| <title> | Defines the document's title that is shown in a browser's title bar or a page's tab. It only contains text; HTML tags within the element, if any, are also treated as plain text. |
| <body> | Represents the content of an HTML document. There can be only one such element in a document. |
| <header> | Represents introductory content, typically a group of introductory or navigational aids. It may contain some heading elements but also a logo, a search form, an author name, and other elements. |
| <footer> | Represents a footer for its nearest ancestor sectioning content or sectioning root element. Typically contains information about the author of the section, copyright data, or links to related documents. |
| <main> | Represents the dominant content of the body of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application. |
| <nav> | Represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes. |
| <p> | Represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields. |
| <a> | Together with its href attribute, creates a hyperlink to web pages, files, email addresses, locations within the current page, or anything else a URL can address. |
| <div> | The generic container for flow content. It has no effect on the content or layout until styled in some way using CSS |
| <li> | Represents 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. |
| <h1>, <h2>, <h3>, <h4>, <h5>, <h6> | Represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest. |
| <img> | Embeds an image into the document. |
Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements