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?

It's the root element of HTML documents. It holds all the content and structure of a webpage and makes the browser interpret it as HTML.
Question 2

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

Stores page info like the title and links to CSS or scripts.
Question 3

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

Sets the text shown on browser tab.
Question 4

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

Contains everything you can see and interact with on the webpage.
Question 5

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

A block elemet creates its own section by starting a new line and pushing other content below it. It helps organize the page. Inline elements lets you style or link parts of text, keeping everything on the same line.
Question 6

What is a self-closing tag?

a tag that doesn't need a closing tag. It ends with "/>".
Question 7

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

The syntax for adding an attribute is attribute="value"
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!