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 tag be the main wrapper in a HTML page. It hold everything on the page, like text, pictures, links. It tell browser this file is HTML. Inside, you got head for info (like title) and body for stuff people see.
Question 2

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

The head tag in HTML keep info about the page that don't show up on screen. It got stuff like page title (what show on browser tab), links to styles (how page look), and meta tags (for SEO and data about page).
Question 3

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

The title element show the page name in the browser tab. It also help with bookmarks and show up in search results, so people know what the page about.
Question 4

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

The body element hold all the main stuff you see on the page, like text, images, links, buttons. It’s where the visible content of the website go.
Question 5

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

Inline element only use space it need and stay in line with other stuff, like a and span. Block element take whole line and start new line, like div and p.
Question 6

What is a self-closing tag?

Self-closing tag is HTML tag that no need end tag. It used for stuff with no content inside, like img or br .
Question 7

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

To add attribute to HTML element, put it in opening tag with = and value in quotes, like class="intro".
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!