HTML elements are the fundamental building blocks of any web page. They represent different content on the web, such as headings, paragraphs, links, images, and more.
- Headings: Used to define the structure of the content. For example,
<h1>
is the highest level of heading, while<h6>
is the lowest.- Example: To create a main title, use
<h1>
.
- Example: To create a main title, use
- Paragraphs: Used to define blocks of text.
<p>
is the default paragraph element.- Example: To create a paragraph, use
<p>
.
- Example: To create a paragraph, use
- Links: Used to create hyperlinks to other web pages or resources. The
<a>
element is used to define a hyperlink.- Example: To create a link, use
<a href="https://www.example.com">Click here</a>
.
- Example: To create a link, use
- Images: Used to include images on a web page. The
<img>
element is used to define an image.- Example: To include an image, use
<img src="image.jpg" alt="Description of image">
.
- Example: To include an image, use
- Lists: Used to organize related items. There are two types of lists: ordered and unordered.
- Ordered List: Use
<ol>
to define an ordered list and<li>
for list items.- Example:
- Example:
- Unordered List: Use
<ul>
to define an unordered list and<li>
for list items.- Example:
- Example:
- Ordered List: Use
For more detailed information and examples, please visit our comprehensive guide on HTML elements: /en/docs/Web/HTML/Element