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 element is the root element, which means it contains all the other elements on the page.
Question 2

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

Contains meta-information about the document.
Question 3

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

Specifies the title of the document, shown in the browser's title bar or tab.
Question 4

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

Contains the content of the document, such as text, images, and other media.
Question 5

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

Inline elements do not start on a new line and only take up as much width as necessary, while block elements start on a new line and take up the full width available.
Question 6

What is a self-closing tag?

A self-closing tag is an HTML element that does not require a separate closing tag. It is closed within the opening tag itself, using a forward slash before the closing angle bracket.
Question 7

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

To add an attribute to an HTML element, you include the attribute name followed by an equals sign and the attribute value in quotes within the opening tag of the element.
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!