Semantic Tags
Semantic Tags
1|Page
3. <article>: The `<article>` tag is used to define a self-contained piece of
content that could be distributed and reused independently, such as a
news article, blog post, or forum post.
5. <nav>- The `<nav>` stands for navigation, and its use indicates that the
content within it is intended for navigation purposes. Typically, it
includes a list of navigation links, buttons, or other navigation-related
elements within the <nav> element.
HTML Code
<head>
<title>Navigation Example</title>
</head>
<body>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
2|Page
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<!-- Rest of the page content goes here -->
</body>
Output
3|Page
• <img>: This is an HTML element used to embed images in a web
page. It has attributes:
o src: Specifies the URL of the image file.
o alt: Provides alternative text for the image, which is displayed if the
image fails to load or for accessibility purposes.
o width and height: Define the width and height of the image,
respectively. These values are set to 100 pixels each in this example.
• <figcaption>: This is an HTML5 element used to define a caption or
legend for a <figure> element. It provides a description or
explanation of the content within the <figure> element.
4|Page