Your first page

What an element is, and what the browser does with the text you write.

A web page is text with markers in it. The markers are called tags, and a browser reads them to decide what each piece of the text is.

<h1>A heading</h1>
<p>A paragraph.</p>

Most tags come in pairs. <h1> opens, </h1> closes, and what sits between them is the content. The browser does not draw the tags — it draws the content, in the way the tag asks for: <h1> large and bold, <p> as a block of prose.

Try it

The playground beside this has a page in it. Change the words between the tags and it redraws as you type.

Then try two things that teach more than they look like:

  1. Add another <p> under the first one. Two paragraphs, two blocks.
  2. Delete the </h1>. The page still shows something — browsers are forgiving — but the rest of it is swallowed by the heading. That is why closing matters.
Loading...
Your first page — RunSnip