HTML_Tags_with_Examples
HTML_Tags_with_Examples
1. <html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<p>Hello, World!</p>
</body>
</html>
2. <head>
<head>
<title>My Page</title>
<meta charset="UTF-8">
</head>
3. <body>
<body>
<h1>Welcome!</h1>
<p>This is a webpage.</p>
</body>
---
Metadata Elements
1. <meta>
2. <title>
3. <link>
4. <style>
<style>
body {
background-color: lightblue;
</style>
5. <base>
<base href="https://example.com/">
https://example.com/about.html -->
6. <script>
<script>
console.log("Hello, World!");
</script>
---
Content Sectioning
1. <header>
<header>
<h1>Site Title</h1>
<nav>
<a href="#home">Home</a>
<a href="#about">About</a>
</nav>
</header>
2. <footer>
<footer>
</footer>
3. <main>
<main>
<article>
<h2>Blog Post</h2>
</article>
</main>
4. <section>
<section>
<h2>About Us</h2>
</section>
...