0% found this document useful (0 votes)
11 views4 pages

HTML_Tags_with_Examples

html tag

Uploaded by

saidrassai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

HTML_Tags_with_Examples

html tag

Uploaded by

saidrassai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HTML Tags with Examples

Basic Document Structure

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>

<meta name="viewport" content="width=device-width, initial-scale=1.0">

2. <title>

<title>My Awesome Page</title>

3. <link>

<link rel="stylesheet" href="styles.css">

4. <style>

<style>

body {

background-color: lightblue;

</style>

5. <base>

<base href="https://example.com/">

<a href="about.html">About</a> <!-- Resolves to

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>

<p>&copy; 2024 My Website</p>

</footer>

3. <main>

<main>

<article>

<h2>Blog Post</h2>

<p>This is a blog post.</p>

</article>

</main>
4. <section>

<section>

<h2>About Us</h2>

<p>We are a web development company.</p>

</section>

...

(Truncated for brevity. Full list available in previous reply.)

You might also like