An HTML tag is a short bit of code in angle brackets that tells a browser what to do with part of a web page. Tags can turn text into a paragraph or heading, emphasize it, create a list, insert an object, or define a link. Think of them as small labels placed in ordinary text: you add the labels, and the browser renders the page. section 1.1 section 1.23
A typical tag has three pieces: a left angle bracket (<), an element name, and a right angle bracket (>). For example, <p> uses the element name p for a paragraph, <em> uses em for emphasis, and <h1> uses h1 for a first-level heading. An element is the named HTML item; a tag is that element name together with its brackets. section 1.14
Most text tags work as a pair:
- Start with an opening tag, such as <h1>. It tells the browser to begin applying that element. section 1.14
- Put the affected text after it. section 1.15
- Finish with a closing tag, such as </h1>. It repeats the element name and adds a forward slash before it. section 1.14
Making a heading
<h1>How New Words Are Created</h1> The opening <h1> starts a first-level heading, the words are the content, and </h1> ends the heading. With only a few characters, the browser gives the text heading treatment: larger and bold compared with regular page text. section 1.15
Opening and closing tags form a container. The container can hold text or even other elements, and the browser displays its contents according to the named element. Most tags need a closing tag, so remember the slash: <p> begins a paragraph and </p> ends it. section 1.14 section 1.23
<h1>How New Words Are Created</h1> #1 #2 #3
Use the labeled heading listing to spot the opening tag, the text it affects, and the closing tag. Then try changing a one-word paragraph such as “Combining” into a second-level heading with h2 tags. section 1.15
Tags handle structure, while CSS handles presentation. Together they let you build a page from plain text rather than a complicated visual interface: HTML identifies things such as headings, paragraphs, and links, and CSS supplies presentation rules. section 1.23 section 2.0



