Article Title
Content for an independent piece of content, like a blog post.
<!DOCTYPE
html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document Title</title>
<meta name="description"
content="A short description of the page">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<!-- Link
to external CSS file -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Page content goes here -->
</body>
</html>
<body>
<header>
<h1>Page Header</h1>
<nav>
<ul>
<li><a
href="#section1">Section 1</a></li>
<li><a
href="#section2">Section 2</a></li>
</ul>
</nav>
</header>
<main>
<section id="section1">
<h2>Section 1</h2>
<p>This is a paragraph inside section
1.</p>
</section>
<article>
<h2>Article
Title</h2>
<p>Content for an independent piece of content, like
a blog post.</p>
</article>
<aside>
<h3>Related
Information</h3>
<p>Side content like links or ads.</p>
</aside>
</main>
<footer>
<p>© 2025
Your Site Name</p>
</footer>
</body>
This is a paragraph inside section 1.
Content for an independent piece of content, like a blog post.
<body>
<figure>
<img src="image.jpg" alt="Description of
image">
<figcaption>Caption for the image</figcaption>
</figure>
<video controls>
<source src="video.mp4"
type="video/mp4">
Your browser does not support the video tag.
</video>
<audio controls>
<source src="audio.mp3"
type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</body>
<body>
<form action="/submit-form" method="POST">
<label
for="name">Name:</label>
<input type="text"
id="name" name="name">
<label for="email">Email:</label>
<input type="email" id="email" name="email">
<button type="submit">Submit</button>
</form>
<button
onclick="alert('Button clicked!')">Click Me!</button>
</body>
<form>: Creates a form for user
input.
<label>: Defines labels for input elements, improving accessibility.
<input>:
Various types (text, email, etc.) for user data entry.
<button>: Triggers
actions; can be used inside or outside a form.
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a
href="#contact">Contact</a></li>
</ul>
</nav>
<main>
<article>
<h2>Article Heading</h2>
<p>This is an article section which stands alone as a piece of content.</p>
</article>
<section>
<h2>Section Heading</h2>
<p>This section groups related content.</p>
</section>
</main>
<footer>
<p>Contact us at email@example.com</p>
</footer>
</body>
This is an article section which stands alone as a piece of content.
This section groups related content.
Semantic tags (e.g., <header>, <nav>, <main>, <article>, <section>, <footer>) provide meaning to the structure of the document, which helps with SEO and accessibility.
<blockquote cite="https://example.com">
<p>This is a blockquote from a cited source.</p>
</blockquote>
<code>console.log('Hello,
world!');</code>
<pre>
// Preformatted text with preserved
whitespace
function greet() {
console.log("Hello, world!");
}
</pre>
<hr><br>
This is a blockquote from a cited source.
console.log('Hello,
world!');
// Preformatted text with preserved whitespace function greet() { console.log("Hello, world!"); }
Leave a Comment