Tag |
Description |
Displayed on page |
<!DOCTYPE html> |
First line in an HTML document. It tells the browser what version of HTML the document is written. |
Not displayed |
<html lang="en"> |
Represents the root of an HTML document and should include the language attribute to declare the language of the Web page. |
<head> |
Is used to define the head portion of the document which contains information related to the document. It contains other head elements such as <title>, <meta>, <link>, <style>, etc. |
<body> |
Contains the entire directly visible content of a webpage. |
Everywhere |
<header> |
Represents introductory content. Typically contains headings (<h1> - <h6>), navigational links(<nav>), logo, icon or authorship information. |
Top of the page |
<main> |
Specifies the main content of a document between the header and the footer. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms. |
Middle of a page |
<section> |
Defines elements in a document, such as chapters, headings, articles with the same theme. |
<article> |
Holds content that makes sense on it's own such as articles, blogs and comments. |
<aside> |
Is used to mark additional information that can enhance another element but isn't required to in order to understand the main content. |
<figure> |
Is used to encapsulate media such as an image, diagram or code snippet. |
<figurecaption> |
Is used to describe media encapsulated within the <figure> element. |
<video> |
Is used to add videos, uses the src attribute to link the source and requires a closing tag. |
<audio> |
Is used to implement audio, uses the src attribute to link the source and requires a closing tag. |
<embed> |
Is used to implement any type of media (for example gifs), uses the src attribute to link the source and is self-closing. |
<footer> |
Defines a footer for a document or section. Typically it contains authorship, copyright, contact information, back to top links, related documents, etc. |
Often at the end of a page |