HTML Syntax

HTML Syntax

October 23, 2025

🧠 What is HTML?

HTML = HyperText Markup Language
It’s the skeleton of a webpage — it builds the structure of what you see online.

🧩 Think of:

  • HTML → bones (structure 🦴)
  • CSS → clothes (style πŸ‘•)
  • JavaScript → brain (actions 🧠)

<!--!+Tab shortcut -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- <meta http-equiv="refresh" content="10">-->
    <!-- <meta name="description" content="Learn HTML basics"> -->
    <title>Document</title>
    <link rel="stylesheet" href="stylesheet.css" />
  </head>
  <body>
    <h1 class="Heading">Hello World</h1>
    <script src="javascript.js"></script>
  </body>
</html>

🏷️ Tags, Elements & Attributes

🧩 What’s a Tag?

A tag tells the browser what kind of content something is.

Example:

<p>Hello!</p>

🧠 Think of tags as “boxes” with labels.

πŸ”Έ Element

A complete pair — opening + content + closing:

<h1>Hello!</h1>

πŸ”Ή Attribute

Adds extra info to a tag:

<img src="dog.jpg" alt="A cute dog">

πŸ’¬ Trick:

  • Tag = “Word”
  • Attribute = “Adjective that describes the word”

πŸ’¬ Comments

<!-- This is a comment -->

🧠 Comments are notes for humans, ignored by the browser.

Shortcut in VS Code:
Ctrl + / (Windows) or Cmd + / (Mac)

Comments

Popular posts from this blog

HTML TAGS