All Web pages are made up of standard parts called elements.
This is a paragraph element. It’s sitting next to an image element containing an historic 1905 lolcat by Harry Whittier Frees.
The Web X-Ray Goggles let you see through the surface of a Web page and explore its underlying elements by moving your mouse.
Try activating the goggles now and see if you can find the two elements in the box above. (Instructions for activating the goggles are back in Mission Two.)
Nice! These elements are expressed by the authors of Web pages in a special language called HTML. It’s like the blueprint for a Web page.
Here is the HTML source code for the paragraph in the above box:
<p>This is a paragraph element. It’s sitting next to an image element containing an historic 1905 lolcat by Harry Whittier Frees.</p>
Now mouse over the original paragraph again. See the similarity between the x-ray of the paragraph and its source code?
Now, deactivate your goggles by pressing ESC.
A computer reads HTML like any plain text document, but it specially treats any text between angled brackets (<
and >
) as instructions called tags. In this case, the <p>
tag means “start a new paragraph”, while the </p>
tag means “end the paragraph most recently started.”
Once a computer reads the HTML “blueprint”, it constructs the elements of the page and displays them—much the same way a human might read a blueprint for a house and then build it.
Now it’s your turn.
In the box below, try writing some HTML that tells the computer to build a paragraph element containing the text “behold my first paragraph”.
Feel free to activate your goggles to take a closer look at what your computer is building from your HTML.