HTML Basics Worksheet

Answer the following questions by adding your answer to the DIV element below each question.

Question 1

What is the significance of the html element in an html document?

The HTML is the root of the document.
Question 2

What is the purpose of the head element in an html document?

The head element is a container for meta-data about the document. It can contain any stylesheets, scripts, fonts or anything else that may define the behavior of the page.
Question 3

What is the purpose of the title element in an html document?

The title element specifies the title of the page, which appears in the browser tab.
Question 4

What is the purpose of the body element in an html document?

The body element contains items that is visable to end-users on the web-page.
Question 5

What is the difference between an inline element and a block element?

Block element takes up the full width of the container and stacks up vertically. Inline elements only take as much width as they need - other elements are able to sit next to them.
Question 6

What is a self-closing tag?

A self-closing tag is an element that does not contain any content or closing tag. They do not have any closing tags because they do not enclose any content.
Question 7

Explain the syntax for adding an attribute to an HTML element?

The syntax for adding an attribute: "element attribute="value"; element: the html tag; attribute: name of the attribute; value: value you assign to the attribute.
Question 8

Add an H3 element that contains the content 'Hello World!'. Then add a class attribute to the H3 element and set the value of the attribute to "glow".

Hello World!