4.
Introduction to HTML
TB Exercise
Q.1 Fill in the blanks.
1 There are 6 levels of headings that you can specify in a web page.
2 The <p> tag is used to begin a new paragraph in HTML
3 Edublocks is a block-based editor that allows users to drag and drop the code blocks to create an
HTML document.
4 Paired tags are also known as container tags.
5 The text attribute is used to specify the colour of the text in a web page.
Q.2 Name the HTML tag you would use for the following tasks.
a To let the browser know that it is an HTML5 document
Ans <html> …………… </html>
b To give a title to the web page
Ans <title> ………….. </title>
c To display headings and subheadings on a webpage
Ans <h1>,<h2>, <h3>, <h4>, <h5>, <h6>
d To begin a new line
Ans <br>
e To underline the text enclosed in it
Ans <u> ……… </u>
Q.3 Answer the following questions.
a Write the basic structure of an HTML document
Ans <!DOCTYPE html>
<html>
<head>
<title>
First web page
</title>
</head>
<body>
Welcome to the world of HTML. This is my first web page.
</body>
</html>
b How can you separate text into various sections in an HTML document?
Ans We can separate text into various sections in Html document using<br> tag.
It is used to separate the line of text.
It is generally used to separate text into smaller, more readable portions or to create a visual break
between paragraphs.
c What are attributes in HTML? Explain their use.
Ans Attributes are added to the opening tag and are written in the form of name-value pairs.
That means the attribute name is written first, followed by an'='sign, and then the attribute
value. The attribute value is generally enclosing quotes. However, it can be given without
quotes if it is a single word.
d What is the use of the 'start' and 'type' attributes in a list?
Ans
Used to Values
type Define the numbering style for each item of '1''I''a'etc
I I I
an ordered list
start Specify the starting value of the first list any number
item
e Raj has created a web page about 'Mountains in India' using HTML. Now he wants to test a
specific part of his web page without affecting the rest. How can he modify his HTML code to
achieve this?
Ans Raj should use the <!--and -->tags. Anything within these tags will be treated as a comment and will not be
displayed on the web page.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
WB Exercise
4. Introduction to HTML
Q.1. Choose the correct word from the box and fill in the blanks.
empty <h6> ordered <h1> Master Language
Markup Language htm Paired unordered
a. HTML has two parts: HyperText and Markup Language.
b. An HTML file must be saved with the extension HTML
c. Tags that do not have a corresponding closing tag are called empty tags.
d. The <h6>tag displays the smallest heading.
e. Alist in which the items are numberedis called an ordered list.
Q.2. Write down the correct HTML tag for the following.
a. A tag that contains all other tags of an HTML document: <html>
b. To define the title of a web page: <title>
c. To make the enclosed text appear in italic format: <i>
d. A tag that contains all other elements ofthe web page: <body>
Q.3. Complete the following HTML codes.
a. To display a heading with the text "Welcome to My Website".
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to My Website</h1>
</body>
</html>
b. To create an ordered list with three items: "Apple", "Banana", and "Orange".
<html>
<head>
<title>Fruits</title>
</head>
<body>
<h1>Fruit List</h1>
<ol>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
</ol>
</body>
</html>
Q.4. Answer the following questions.
a. What is the purpose of the !DOCTYPE declaration in HTML?
Ans: The !DOCTYPE declaration is used to specify the version of HTML that the
web page is written in.
b. List any two limitations of block-based coding?
Ans:
It has a limited set of predefined blocks that can be used, so it is difficult to
create complex HTML pages.
It can get difficult to read and follow long pages of HTML code created
using blocks.
It also becomes difficult to find and fix errors in block-based code.
(Any two)
c. Aliya has created a web page in HTML. It displays an article on various parts of the
human body. She wants to visually separate each article by adding a line. Describe
the HTML tag that will help her do the same.
Ans: She can use <hr> horizontal ruler tag. It is used to insert a horizontal line on
a web page to visually separate the content on a web page. It can also be
used to separate different sections of an article or to separate a header from
the rest of the page content.
d. What is the purpose of the <!--… --> tags in an HTML document?
Ans: The <!--...--> tags in an HTML document are used to insert comments. These
comments are not displayed in the browser when the HTML document is
rendered.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>