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 contains all the other elemnets in the document. It is known as the root element.
Question 2

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

The head element in an html document is used to store medadata like the documents itself or the title.
Question 3

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

The title element in an html document definces the title of a webpage. It's displayed in the browser's title tab.
Question 4

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

The body element in an html document acts as a container for all the visible content that will be displayed. For example text, videos, images, and interactive elements.
Question 5

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

A block element takes up the full width of avaibale space while the inline element only occupies the space required by its content. A block element always starts on a new line while an inline element does not.
Question 6

What is a self-closing tag?

A self-closing tag is a tag that does not need to be closed manually. It cannot contain other elements or content.
Question 7

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

Attributes are things you can add to the opening tag of an element and gives more information of the element.
jjjjjjjj 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!