Chapter 2: HTML Elements and Attributes
2.1 HTML Elements
HTML elements are the fundamental building blocks of a webpage. Each element is
represented by an opening and closing tag, with content placed between them.
Elements define different parts of a webpage, such as headings, paragraphs, links,
and images. Some of the most commonly used HTML elements include:
Headings (<h1> to <h6>): Used to define headings of different sizes, where <h1> is
the largest and <h6> is the smallest.
Paragraphs (<p>): Define blocks of text, making content readable and well-
structured.
Links (<a href="">): Create hyperlinks to navigate between web pages.
Images (<img src="" alt="">): Embed images within a webpage.
Lists (<ul>, <ol>, <li>): Used to create unordered and ordered lists.