๐Ÿ”– HTML Tags Explained

HTML is made of tags โ€” small pieces of code that tell the browser how to display content. Tags usually come in pairs: an opening tag and a closing tag.

Syntax: <tagname>Content</tagname>
Example: <p>Hello World</p>

๐Ÿ“Œ Common HTML Tags

โœ… Example: Using Headings & Paragraphs

<h1>Welcome!</h1>
<p>This is a simple paragraph to explain HTML tags.</p>

โœ… Example: Anchor Tag

<a href="https://www.google.com">Visit Google</a>

This tag creates a clickable link that opens Google.

โœ… Example: Image Tag

<img src="https://via.placeholder.com/150" alt="Placeholder Image">

The alt attribute gives a description if image fails to load.

๐Ÿ’ก Tip: Use alt text in images for accessibility and better SEO!

๐Ÿงช Try It Yourself

Write a small HTML snippet with your name as a heading and a paragraph about your favorite hobby.

Next: HTML Forms โžก๏ธ