An HTML element is a named piece of a web page, like a paragraph, an emphasis, or a heading. Think of it as a little instruction for the browser: “Treat this content as this kind of thing.” The element name is the short code, such as p, em, or h1; the tag is that name wrapped in angle brackets, such as <p> or <em>. section 1.14
Most elements use an opening tag and a closing tag to make a container. Put content between them, and the browser lays it out according to that element. The closing tag repeats the name but adds a forward slash. section 1.14
Make a heading
To make an article’s main heading, wrap its words in h1 tags: <h1>How New Words Are Created</h1> The opening <h1> starts a first-level heading, and </h1> tells the browser where that heading ends. Heading elements h1 through h6 can also show how page text is organized. section 1.14 section 2.20
A basic page uses elements as containers inside other elements:
- The html element wraps the page’s HTML and CSS. section 2.2
- The head element holds page information, including character-set, title, and style elements. section 2.2
- The body element holds most of the page’s visible HTML tags and text. section 2.2
Listing 2.1 A Basic HTML Structure for Starting Any Web Page Project
<!DOCTYPE html> #1
<html lang="en"> #2
<head> #3
<meta charset="utf-8"> #4
<title></title> #5
<style></style> #6
</head> #3
<body> #7
</body> #7
</html> #2
Use this starter structure to spot matching opening and closing tags and see where the html, head, and body elements belong. section 2.2
Try it: add a short phrase between <em> and </em>, then add a heading between <h1> and </h1>. Each pair marks where one kind of content begins and ends. section 1.14



