Choose the correct option
In an HTML document, what does the letter H mean?
Reason — The full form of HTML is Hyper Text Markup Language.
Which of the following is the correct representation of html tags?
- all of the above
Reason — Tags are marked by the angle braces (<...>). For example,
<HTML>, <TITLE>, <HEAD>, etc. are tags.
Which of the following heading tags will display the largest heading size?
Reason — Heading tag includes six different levels of headings which vary from
<H1> tag is used to define the largest heading whereas,
<H6> defines the smallest heading.
Which of the following is created using HTML?
- Web browser
Reason — A 'Web Page' is a document that is written in Hypertext Markup Language (HTML).
Which of the following contents of HTML is enclosed within opening and closing tags?
Reason — In HTML, the content written within an opening tag and closing tag is called the element.
Fill in the blanks
HTML means Hyper Text Markup Language.
A set of pages of information on the Internet about a particular subject is called a website.
The language used to create web pages is known as HTML.
Every HTML document begins with
<HTML> and ends with
The tags which require start and end tags are called container tags.
Empty tags do not require a closing tag in an HTML document.
An HTML document has two parts
The content written within the
<Title> tag does not appear on the web page.
An HTML file is generally created on Notepad.
An HTML document is saved with the extension .html.
Case-Study Based Questions
Generally, the web browser displays an HTML document with background white and foreground black. However, you can change the appearance of the document by changing the background as well as the text colour. Now, answer the following to perform the given tasks on an HTML code.
(a) Name a web browser which executes HTML code.
(b) What is the default text colour of an HTML document?
(c) A syntax is defined as:
<BODY bgcolor = "color name">
What does bgcolor specify in this syntax?
(d) What does color name specify in the syntax given in part (c)?
(a) Google Chrome
Explain the following with reference to HTML
When the opening and closing tags are used in pairs in an HTML document, they are known as container tags. They are also known as ON tag and OFF tag respectively. ON tag uses angle bracket whereas, OFF tag uses forward slash (/) after the opening of the angle bracket (<). The contents are written within these tags in the document.
The format of HEAD container tag is as follows-
<head> content </head>
The tags which do not require a closing tag in an HTML document are called ‘Empty Tags'. This means that an empty tag has only an ON tag in the document which is understood by the web browser. For example,
HTML allows you to highlight headings in a web page by using the heading tags. They are container tags. They include six different levels of headings which vary from
<Hl> tag defines the largest heading whereas,
<H6> tag defines the smallest heading.
The syntax of heading tag is as follows:
<Heading tag> string of text for heading </Heading tag>
Body tag contains the main HTML document that we want to display on the web page. The attributes of the body tag (bgcolor, text etc) can be used to change the appearance of the main document.
The syntax of the body tag is as follows:
<BODY BGCOLOR="BLACK" TEXT="WHITE"> Contents of the document </BODY>
The Paragraph Tag
<P> is a container tag. The opening tag
<P> is added at the beginning of a paragraph and the closing tag
</P> at the end of the paragraph. With the use of the paragraph tag, a single line is inserted before and after the enclosed paragraph.
The syntax of the paragraph tag is as follows:
<P> Paragraph 1 </P> <P> Paragraph 2 </P>
The line break tag
<BR> is an empty tag. It works in the same way as pressing the 'Enter' key in a word processor. It helps the user to change the line.
An example of the line break tag is as follows:
<BODY> NAME: AMAN BHATIYA <BR> FATHER'S NAME: SHREE DIVESH CHANDRA BHATIYA <BR> MARIGOLD BLOCK: 2/1<BR> HERITAGE VILLA <BR> MARINE DRIVE ROAD <BR> JAMSHEDPUR - 831011 <BR> </BODY>
Short Answer Questions
What is HTML?
Hyper Text Markup Language is a markup language used to design and display web pages or documents on the internet using web browsers. It includes text as well as graphics. It also provides the means to link the pages on the internet. The pages contain text as well as graphics.
HTML uses special tags or symbols while writing a piece of information. For example, the text in bold is written as:
<B> Understanding Computer Sciences
</B> are HTML tags. The HTML will make the text bold as Understanding Computer Science.
What is the basic structure of an HTML document?
Every HTML document is written inside
</HTML> tags which represent the beginning and the end of a web page, respectively. An HTML document mainly consists of two main parts. They are:
- HEAD — It contains the title of a web document and written within
</HEAD>tags. The tag include
<TITLE>tag within it. The content written within the
</TITLE>tags does not appear on the web page.
- BODY — It is the main HTML document that we want to display on the web page. It is written within
The basic structure of an HTML document is as follows:
<HTML> <HEAD> <TITLE>...the title of the web page....</TITLE> </HEAD> <BODY>.... .........the body of the document....... ..... </BODY> </HTML>
What is meant by HTML tags?
Tags are the keywords used in an HTML document. They are marked by the angle braces (< and >) to write instructions and define how the content will be displayed by the web browsers. For example,
<HEAD>, etc. are tags.
Name the two features of an HTML document.
The two features of an HTML document are:
- Every HTML document is written inside
</HTML>tags which represent the beginning and the end of a web page respectively.
- The main document is written within
Name two web browsers which are used to view an HTML document.
Two web browsers which are used to view an HTML document are-
- Microsoft Edge
- Google Chrome
|<P> tag||<BR> tag|
|The paragraph tag helps to identify and separate paragraphs in an HTML document.||The line break tag works in the same way as pressing the 'Enter' key in a word processor.|
|The paragraph tag inserts a single line before and after the enclosed paragraph.||The line break tag adds blank spaces between the lines.|
|It is a container tag.||It is an empty tag.|
Write all the steps
To start writing an HTML document.
To start writing an HTML document on Notepad, follow these steps:
Step 1: Click ‘Start' followed by clicking 'Notepad' from the pop up menu.
Click on shortcut icon ‘Notepad', if available on the desktop.
Click on ‘Notepad' icon, if available on the taskbar. An untitled notepad will appear on the screen.
Step 2: Now, one can start writing the HTML code by using the following tags:
<HTML> <HEAD> <TITLE> FIRST EXPERIENCE ON HTML </TITLE> </HEAD> <BODY> LEARNING HTML DOCUMENT ................... </BODY> </HTML>
To view an HTML document on a web page.
To view an HTML document on a web page, follow these steps:
Step 1: Locate the file where you have saved the file. Select the file and right-click on it.
Step 2: Select 'Open with' followed by clicking 'Microsoft Edge'.
The document saved will appear on the web browser.
To save an HTML document.
To save an HTML document, follow these steps:
Step 1: Click 'File' from the file menu.
Step 2: Select 'Save As' from the drop-down list.
Step 3: Enter the file name with the extension '.HTML' (say, MYFILE.HTML) in the box provided.
Step 4: Click the 'Save' option.
The file MYFILE.HTML will be saved and the untitled file will become MYFILE on Notepad.
Answer the following
Write an HTML document by using paragraph and line tags to format the following poem 'Two Little Dicky Birds'.
TWO LITTLE DICKY BIRDS
TWO LITTLE DICKY BIRDS
SITTING ON A WALL
ONE NAMED PETER, ONE NAMED PAUL
FLY AWAY PETER, FLY AWAY PAUL
COME BACK PETER, COME BACK PAUL
<html> <head> <title> TWO LITTLE DICKY BIRDS </title> </head> <body> <p> TWO LITTLE DICKY BIRDS <BR> TWO LITTLE DICKY BIRDS <BR> SITTING ON A WALL <BR> ONE NAMED PETER, ONE NAMED PAUL <BR> FLY AWAY PETER, FLY AWAY PAUL <BR> COME BACK PETER, COME BACK PAUL <BR> </p> </body> </html>
The format of an HTML document is given below. Rearrange the format so that it can be understood by the web browser.
<HEAD> <HTML> </TITLE> MY FIRST STEP TO HTML <TITLE> </BODY> SEARCH ENGINES ARE THE SOFTWARES ON THE WEB WHICH HELP YOU TO LOOK FOR THE SPECIFIC INFORMATION. <BODY> </HEAD> </HTML>
<HTML> <HEAD> <TITLE> MY FIRST STEP TO HTML </TITLE> </HEAD> <BODY> SEARCH ENGINES ARE THE SOFTWARES ON THE WEB WHICH HELP YOU TO LOOK FOR THE SPECIFIC INFORMATION. </BODY> </HTML>