The <main>
element is used to define the main content of a document or application. It should contain content that is unique to the page and is not repeated across pages (such as headers, footers, or navigation).
Example usage:
<main>
<h1>Main content goes here</h1>
<p>This is the core content of the page.</p>
</main>
The <figure>
element is used to represent content that is referenced from the main content, such as images, illustrations, diagrams, or code snippets. It can be used with the <figcaption>
element to provide a caption.
Example usage:
<figure>
<img src="image.jpg" alt="Example image">
<figcaption>This is a caption for the image.</figcaption>
</figure>
The <figcaption>
element is used to provide a caption for a <figure>
element. It helps to describe or explain the content within the figure, such as images or illustrations.
Example usage:
<figure>
<img src="chart.jpg" alt="Chart">
<figcaption>This chart shows the yearly growth.</figcaption>
</figure>
The <mark>
element is used to highlight parts of the content. It is useful for marking text that is of particular relevance, such as search results or important terms.
Example usage:
<p>This is a highlighted term.</p>
The <time>
element is used to represent a specific time or date, which can be used for machine-readable date and time formats. It allows you to specify dates, times, or durations.
Example usage:
<time datetime="2025-02-25">February 25, 2025</time>
The
<main>
element is used to define the main content of a document or application. It should contain content that is unique to the page and is not repeated across pages (such as headers, footers, or navigation).
Example usage:
<main> <h1>Main content goes here</h1> <p>This is the core content of the page.</p> </main>
The
<figure>
element is used to represent content that is referenced from the main content, such as images, illustrations, diagrams, or code snippets. It can be used with the <figcaption>
element to provide a caption.
Example usage:
<figure> <img src="image.jpg" alt="Example image"> <figcaption>This is a caption for the image.</figcaption> </figure>
The
<figcaption>
element is used to provide a caption for a <figure>
element. It helps to describe or explain the content within the figure, such as images or illustrations.
Example usage:
<figure> <img src="chart.jpg" alt="Chart"> <figcaption>This chart shows the yearly growth.</figcaption> </figure>
The
<mark>
element is used to highlight parts of the content. It is useful for marking text that is of particular relevance, such as search results or important terms.
Example usage:
<p>This is a highlighted term.</p>
The
<time>
element is used to represent a specific time or date, which can be used for machine-readable date and time formats. It allows you to specify dates, times, or durations.
Example usage:
<time datetime="2025-02-25">February 25, 2025</time>
Use the <link> tag inside the <head> to attach an external CSS file.
Comments in HTML are written between <!-- and -->.
HTML entities are used to display reserved or special characters.
The <iframe> tag embeds another webpage within the current page.
The id attribute uniquely identifies a single HTML element.
Hyperlinks are created using the <a> tag with an href attribute.
Use the <img> tag and specify the image source with the src attribute.
Use the target="_blank" attribute inside the <a> tag.
Copyrights © 2024 letsupdateskills All rights reserved