Every HTML page has the same basic structure. We start with a
doctype declaration; this tells the browser that the entire page is HTML. After the doctype comes our main HTML element's opening tag,and at the very bottom we have its closing tag. Everything else is content inside the HTML element.
The majority of the HTML we write will be visible to the user but sometimes we want to give instructions to the browser that the user doesn't need to see. We do this by splitting the page into a
head and a
We can include our CSS stylesheet file with a
link element. As you can see, the background colour has changed. This link element tells the browser the location of the CSS file via the
href attribute, just like the anchor element.
The body is where we put our content. Everything in the body is visible to the user.Play