HTML Elements Overview
HTML elements are the building blocks of an HTML document. Each element has a specific purpose and syntax. Here is an overview of various types of HTML elements:
-
Structural Elements:
<html>- The root element that encompasses the entire HTML document.<head>- Contains meta-information about the document, such as title and links to scripts and styles.<body>- Contains the content of the document that is visible to users. -
Text Formatting Elements:
<h1>to<h6>- Headings that range from the largest (<h1>) to the smallest (<h6>).<p>- Defines a paragraph.<strong>- Defines important text, typically bold.<em>- Defines emphasized text, typically italic. -
Lists:
<ul>- Defines an unordered (bulleted) list.<ol>- Defines an ordered (numbered) list.<li>- Defines a list item within<ul>or<ol>. -
Links and Media:
<a>- Defines a hyperlink, used to link to other pages or resources.<img>- Defines an image.<video>- Defines a video. -
Tables:
<table>- Defines a table.<tr>- Defines a row in a table.<td>- Defines a cell in a table.<th>- Defines a header cell in a table. -
Forms:
<form>- Defines an HTML form for user input.<input>- Defines an input control.<textarea>- Defines a multi-line text input control.<button>- Defines a clickable button. -
Semantic Elements:
<header>- Defines a header for a document or section.<footer>- Defines a footer for a document or section.<article>- Defines an independent, self-contained piece of content.<section>- Defines a section in a document.<nav>- Defines navigation links.