HTML Structure
HTML (Hypertext Markup Language) is a markup language used to create web pages. It provides a way to structure and display content on a web page, including text, images, and videos. HTML uses a series of tags to define the different elements of a web page, such as the header, body, and footer.
Tags
HTML tags are surrounded by angle brackets (<>). The opening tag defines the start of an element, and the closing tag defines the end of an element. For example, the following HTML code defines a paragraph:
<p>This is a paragraph.</p>
Tags can also have attributes, which are used to provide additional information about an element. For example, the following HTML code defines a paragraph with a red font:
<p style=color: red>This is a paragraph with red font.</p>
Structure of an HTML Document
An HTML document consists of the following sections:
Head
The head section contains information about the web page, such as the title, author, and keywords. It is not displayed on the web page itself.
Body
The body section contains the content of the web page, such as text, images, and videos. It is displayed on the web page.
List of HTML Tags
- <html> – Defines the start of an HTML document
- </html> – Defines the end of an HTML document
- <head> – Defines the head section of an HTML document
- </head> – Defines the end of the head section of an HTML document
- <body> – Defines the body section of an HTML document
- </body> – Defines the end of the body section of an HTML document
- <p> – Defines a paragraph
- </p> – Defines the end of a paragraph
- <h1> – Defines a heading
- </h1> – Defines the end of a heading
- <h2> – Defines a subheading
- </h2> – Defines the end of a subheading
- <h3> – Defines a sub-subheading
- </h3> – Defines the end of a sub-subheading
- <h4> – Defines a sub-sub-subheading
- </h4> – Defines the end of a sub-sub-subheading
There are many more HTML tags that can be used to create web pages. For more information, please visit the MDN Web Docs.
Kind regards M. Martin.