What a Web Page is Made From


HTML is a set of tags you wrap around the different parts of your page to specify what each bit is. If you have a paragraph of text you wrap it up in <p></p> tags like this:

<p>Call me Ishmael. Some years ago – never mind how long precisely - having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.</p>


CSS is the instructions your web browser uses to style the content of your page. You write a bit of text called a selector that specifies exactly what you want to style – as broad as “every <p> tag” or as specific as “the third <p> tag inside the <section> tag that I named articles” – followed by a list of attributes and the values you want to apply to them. Here’s how to make all your paragraphs purple:

p {
    color: #8000FF;


JavaScript is what happened when somebody said “What if I could make it so that the text in my paragraph turned orange when a user clicked on it?”

document.getElementById('first_paragraph').onclick = function() {
	paragraph.style.color = "orange";

The next somebody said “What if clicking the text made an ad appear, too?” Then somebody on the Chrome team at Google said “What if clicking the text could give the web page access to USB devices?”