An HTML tag is markup enclosed in angle brackets that identifies an element or marks its boundary. An opening tag starts the element, while a closing tag ends it. section 7.2.1 section 8.3.4
Tags tell the browser what kind of content they enclose. For example, h1 creates a main heading, p marks a paragraph, a creates a hyperlink, and img identifies an image. Browsers also apply default display properties, which CSS can later modify. section 7.2.1 section 7.2.2
Keep these related terms separate:
- An HTML element includes the opening tag, enclosed content, and closing tag. section 8.3.4
- An HTML attribute adds information inside a tag, such as an iframe's width, height, source URL, or title. section 8.3.4
- CSS changes the browser's default declarations instead of requiring repeated edits to individual HTML elements. section 7.2.1 section 7.2.2
A heading tag
In <h1>MAJOR HEADLINE</h1>, <h1> opens the heading, the words provide its content, and </h1> closes it. The browser displays the heading using its default h1 styling unless CSS changes it. section 7.2.1
<h1>MAJOR HEADLINE</h1>
Inspect the opening and closing h1 tags around the headline text. section 7.2.1



