HTML chapter1

Chapter 1 — Introduction to HTML

  • What is HTML?
    HyperText Markup Language — the standard language for creating web pages. It defines the structure and content of a page using elements (tags).
  • Basic building blocks:
    • Element = <tag>content</tag> (most have opening & closing tags).
    • Attributes add extra info: <a href="url">link</a>.
  • Document structure (skeleton): <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Page Title</title> </head> <body> <!-- visible content here --> </body> </html>
  • Head vs Body:
    • <head>: metadata, page title, links to CSS, meta tags.
    • <body>: visible content (text, images, links).
  • Common text elements: headings (<h1><h6>), paragraphs (<p>), line breaks (<br>), horizontal rule (<hr>).
  • Comments: <!-- This is a comment -->
  • Why semantic HTML matters: accessibility, SEO, and maintainability (use elements for their intended purpose).

Leave a Comment

Your email address will not be published. Required fields are marked *