A1. HTML stands for HyperText Markup Language. It is a markup language used to create and structure web pages using elements and tags.
A2. Basic HTML structure includes:
A3. HTML tags are the markup code (like <p>), while HTML elements include both the opening tag, content, and closing tag (like <p>Hello</p>).
A4. HTML attributes provide additional information about elements.
Examples:
- id="header"
- class="menu"
- src="image.jpg"
- href="link.html"
A5.
- Block-level elements (div, p, h1) take full width and start on new lines
- Inline elements (span, a, img) take only necessary width and don't break lines
A6. DOCTYPE tells the browser which version of HTML the page uses, ensuring proper rendering and standards compliance.
A7. Tables use <table>, <tr>, <td> tags. Colspan spans columns horizontally, rowspan spans rows vertically.
A8. Forms collect user input using <form> tag.
Input types: text, password, email, number, checkbox, radio, file, submit, reset.
A9.
| Method | Data Location | Visibility | Size Limit | Use Case |
|---|---|---|---|---|
| GET | URL | Visible | Limited | Data retrieval |
| POST | Request body | Hidden | Unlimited | Data submission |
A10.
- Images:
<img src="image.jpg" loading="lazy" alt="description"> - Videos:
<video controls><source src="video.mp4" type="video/mp4"></video>
A11. Semantic elements clearly describe meaning:
- <header>
- <nav>
- <main>
- <article>
- <section>
- <aside>
- <footer>
A12.
- Ordered lists:
<ol><li>Item</li></ol> - Unordered lists:
<ul><li>Item</li></ul> - Definition lists:
<dl><dt>Term</dt><dd>Definition</dd></dl>
A13. HTML entities represent special characters:
- < (<)
- > (>)
- & (&)
- " (")
- (space)
A14. Iframes embed another document within current page:
Used for: embedding maps, videos, external content.
A15. Meta tags provide metadata about HTML documents: charset, viewport, description, keywords. Important for SEO and responsive design.