What is HTML?
- HTML = HyperText Markup Language.
- HyperText → Linking web pages.
- Markup Language → Uses tags to structure content.
- First Website: 1st Website
⚙️ Setup
- Install VS Code → Download VS Code
- Extensions
- Live Server → Auto-refresh preview.
- Prettier → Auto-format code.
📖 Common HTML Tags
- 1. Headings <h1>–<h6>
- <h1> → Main title (use once per page).
- <h2> → Section heading.
- <h3> → Sub-section.
- Down to <h6> → least important.
- Purpose: Creates hierarchy & improves SEO.
- Paragraph <p>
- Groups sentences into blocks
- Browsers add spacing before/after automatically.
- Use multiple <p>, not multiple <br>.
- Horizontal Rule <hr>
- Defines a thematic break.
- Often displayed as a horizontal line.
- Line Break <br>
- Creates a single line break (like pressing Enter once).
- Use in addresses, poems, etc.
- Lists
- <ul> → Unordered list (bullets).
- <ol> → Ordered list (numbers).
- <li> → List items inside <ul> or <ol>.
- Supports nesting (list inside list).
- Anchor <a>
- Creates hyperlinks.
- Attribute:
- href → destination link.
- target="_blank" → opens in new tab
- Makes text/image clickable.
- Image <img>
- Self-closing tag
- Attributes:
- src → image path.
- alt → description (accessibility).
- height/width → size.