<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Semantic HTML Example</title>
</head>
<body>
<header>
<h1>My Website</h1>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>Welcome to My Website</h2>
<p>This section provides an overview of the website.</p>
</section>
<article>
<h2>Blog Post</h2>
<p>This is a blog post about the importance of semantic HTML.</p>
</article>
<section>
<h2>Services</h2>
<p>Details about the services provided.</p>
</section>
</main>
<footer>
<p>Copyright 2023. All rights reserved.</p>
</footer>
</body>
</html>The user experience and SEO performance are enhanced by this structure, which guarantees that the online material is meaningfully structured.
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