0% found this document useful (0 votes)
3 views3 pages

Structure of HTML

Notes on structure of HTML document
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Structure of HTML

Notes on structure of HTML document
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Structure of HTML Document

Fill in the blanks :

1. In HTML, instructions or commands are represented in the form of tags.


2. Tags are also called as Markups.
3. Tags are enclosed within angular brackets.
4. HTML uses two types of tags or tag elements.
5. The first and last tags of a HTML document should always be
<html>…</html> tags.
6. Enclosing a tag within another tag is called as nesting of tags.
7. Attributes are additional information given to a tag.
8. Body section comes after the head section.
9. Empty tags represent the formatting options such as line break and
horizontal ruler.
10. Container tag has a section of text which specifies the formatting
construction.

Answer the following :

1. What are tags?


Ans : In HTML, tags are the fundamental building blocks used to structure and
format content on a webpage. They are commands enclosed in angle brackets <
> that define different elements and their behaviour. Tags instruct the browser
how to display a HTML document. Tags are also called as Markups.
2. Explain the sections of HTML. Give example.
Ans : The HTML document consists of two sections – head section and body
section.
Head section contains all document header information like title of the document.
This section begins and end with <head> … </head> tags. Within the head tag
<title> … </title> tag is used to write the title of the web page.
Ex : <html>
<head>
<title>CFTRI School Home page</title>
</head>
</html>
Body section comes after head section. It contains all the contents of web page
like text, picture, sound, table that are to be displayed in the browser window.
The body section is enclosed within <body> … </body> tags.
Ex : <html>
<head> … </head>
<body>

Page 1 of 3
This is a sample text in web page.
</body>
</html>
3. Define attribute.
Ans : Attributes are additional information added to a tag. They are used for
specific purpose. Attributes are added only to the start tag. Attributes are placed
inside the opening tag, following the tag name, and are written as name="value"
pairs.
4. What are the two types of tag elements?
Ans : The two types of tag elements are – container tag and empty tag.
5. What is the use of comment tag? Detail.
Ans : Comments are enclosed in <!-- comment text --> tags in HTML. They
serve as explanatory notes within the HTML code. A HTML document can have
any number of comment lines and comments can be added anywhere in an
HTML document. Comments are not displayed in the browser but it is a
reference for developers and users.
6. Write a note on container tag. Give example.
Ans : Container tags enclose contents of web page. They act as wrappers,
defining the beginning and end of a section of content, allowing for better
organization and layout. These tags typically come in pairs: an opening tag and a
closing tag, which indicate the start and end of the container's content.
Ex : <body> Content of web page </body>.
7. Give two differences between start tag and end tag.
Ans : Start Tag : a) Indicates the start of an HTML element. b) Usually enclosed
in angle brackets <>. c) Contains the element's name. Ex : <body>, <html>
End Tag : a) Indicates the end of an HTML element. b) Also enclosed in angle
brackets, but with a forward slash / before the element name. c) Important for
defining the boundaries of the content that the tag encompasses.
8. What happens if a html document does not contain a <html> tag?
Ans : <html> … </html> tags instruct the web browser about the beginning and
end of a web page. A blank screen is displayed in the browser, if a html
document does not contain a <html> tag.
9. Write down the basic structure of an HTML document.
Ans : <html>
<head>
Head section <title>Tittle of the page</title>
</head>
<body>
Body section Content of web page.
</body>
</html>

Page 2 of 3
10. What is an empty tag?
Ans : An empty tag represents the formatting options like line break, horizontal
ruler, paragraph setting etc. Empty tags have only starting tag but not the ending
tag. Ex : <br>, <hr>, <p> etc
11. What is nested tag?
Ans : When a tag has another tag with in it, it is called nested tag.
Ex : <html>
<head> … </head>
<body>
<b>This is a sample text in web page.</b>
</body>
</html>
In this example <body> tag is having bold <b>…</b> tag with in it
Write the functions of the following tags :

1. <html>
2. <head>
3. <body>
4. <title>
5. <! - - comment - - >

Ans: 1. <html> - beginning and end of html document


2. <head> - beginning and end of head section
3. <body> - beginning and end of body section
4. <title> - to display title of the page in title bar
5. <! - - comment - - > - to insert comments

Page 3 of 3

You might also like