Introduction to HTML

What is HTML? 🧱

HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. From headings to images to links, HTML gives the web its structure.

>>"HTML is the foundation of all web pages. Without it, there is no web." 🌍

πŸ’‘ Why Learn HTML?

  • πŸ“„ It structures web content like text, images, links, and more.
  • βš™οΈ It forms the basis for learning CSS and JavaScript.
  • 🌍 Every website uses HTML – it’s universal!

πŸš€ Basic Structure of an HTML Document

Every HTML page starts with a standard structure. Here's how a basic document looks:

Basic HTML Document Structure

<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is my first HTML page.</p>
  </body>
</html>
πŸ“Œ Explanation of Key Tags
TagDescription
<!DOCTYPE html>Declares the document as HTML5
<html>Root element of the HTML page
<head>Contains metadata like title, links, and scripts
<body>Contains the visible content of the webpage

πŸ›  Common HTML Tags You Should Know

  • <h1> to <h6> – Headings
  • <p> – Paragraph
  • <a> – Anchor (Link)
  • <img> – Image
  • <ul>, <ol>, <li> – Lists
  • <div> – Division or section
  • <span> – Inline container

Note

⚠️ HTML tags are not case-sensitive, but it’s best practice to use lowercase for readability and consistency.

πŸ–Ό Example: Adding an Image and Link

Link with Image

<a href="https://www.example.com">
  <img src="image.jpg" alt="Example Image" />
</a>

This snippet creates a clickable image that links to another website.

🌟 Learn More

You can dive deeper into HTML by visiting the official documentation and guides:

>>"Start with HTML, and you can build the world of the web one tag at a time." πŸ’»βœ¨