Solutions
Summative Assessment Short Answer Questions
9. How many alignments are available for aligning
Multiple-Choice Questions (MCQs) images in a Web page? Name them.
1. Web browsers display images in the following Ans. In HTML, five types of alignment are available to align an image,
format: which are:
Top
a. GIF b. XBM
Middle
c. JPEG d. All of these Bottom
Ans. d
Left
2. The attribute of the <IMG> tag is Right
used to provide alternate text for an image. 10. Which attribute is used to name the different
a. ALT b. SRC sections of a Web page?
c. IMG d. None of these Ans. The NAME attribute is used to name the different sections of a
Ans. a Web page.
3. Which of the following attributes is used to set the 11. Define the <TH> and <TR> tags. Are the two tags
color of visited links? similar?
Ans. TH in the <TH> tag stands for Table Header. You can use the
a. LINKCOLOR b. LINK <TH> tag to display the content of a table in the heading style,
c. VLINK d. BGCOLOR which appears in bold. On the other hand, TR in the <TR> tag
Ans. c stands for Table Row. This tag is used to create a table row. No,
<TH> and <TR> tags are not similar.
4. Which of the following tags supports the
12. What is the function of the <TD> tag?
CELLSPACING attribute?
Ans. The <TD> tag allows you to create cells in an HTML table.
a. <TABLE> b. <TH>
13. What is the function of the <TR> tag?
c. <TD> d. <TR>
Ans. The <TR> tag is used to create a table row.
Ans. a
14. Which tag helps to divide a table horizontally?
Very Short Answer Questions Ans. The <TR> tag helps to divide a table horizontally as it allows you
to create a new row in a table.
5. Which attribute of the <IMG> tag is used to insert
an image in a Web page? 15. In HTML, which attribute is used to apply a border
Ans. The SRC attribute of the <IMG> tag is used to insert an image in to a table?
a Web page. Ans. The BORDER attribute is used to apply a border to a table.
6. How can you apply alternate text to an image?
Ans. In HTML, the ALT attribute of the <IMG> tag is used to provide
Long Answer Questions
alternate text for an image. 16. Insert an image in a Web page. Apply the border to
7. Which tag is used to create a hyperlink? the image and provide alternate text to it. Now, link
Ans. The <A> tag is used to create a hyperlink. the image in the Web page to another document.
Ans. The source code of HTML_Test2.html is shown as follows:
8. In which attribute of the <A> tag, do you specify <HTML>
the URL of the file that you want to link? <HEAD>
Ans. In the HREF attribute of the <A> tag, we specify the URL of the <TITLE>
file that we want to link. Inserting an Image
</TITLE>
</HEAD>
<BODY>
<A HREF=”HTML_Doc.html”> <IMG SRC=”fairy.jpg” An HTML table consists of rows and columns, which are further
BORDER=2 ALT=”Image is linked”> </A> divided into cells in which you can enter data. Tables allow you to
</BODY> arrange disparate data in the Web page in a format that is easy to
</HTML> read and understand. The data of a table may be text or graphics.
The source code of HTML_Doc.html is shown as follows: Cells are a combination of rows and columns. The data of a table is
<HTML> contained in its cells. In HTML, you can create a table by using the
<HEAD> <TABLE> tag.
<TITLE>
</TITLE> 19. Create a Web page that contains some text. Now,
</HEAD> link the text with another Web page. In addition,
<BODY BGCOLOR=”red” TEXT=”white”> ensure that when you move the mouse pointer over
<CENTER> <B> Welcome to HTML </B> </CENTER>
the hyperlinked text, the name and information
This is the destination page.
</BODY> related to the hyperlink Web page is displayed.
</HTML> Ans.
The output of the HTML_Test2.html Web page is shown in <HTML>
Figure 1: <HEAD>
<TITLE> Linking Web pages
</TITLE>
</HEAD>
<BODY BGCOLOR=”yellow”>
<CENTER> <B> Welcome to HTML </B> </CENTER>
<A HREF=”HTML_Doc.html” TITLE=” Linked with
HTML_Doc.html”> Click Here </A>
</BODY>
</HTML>
The output of the above mentioned code is shown in Figure 3:
21. Write the HTML code to insert a table that has three
columns and four rows.
Figure 2: The Html_Doc.html Page Ans.
<HTML>
17. What is the difference between internal and external <HEAD>
linking? <TITLE>
</TITLE>
Ans. The main difference between external and internal linking is that </HEAD>
in external linking, when you click the hyperlink, a document <BODY>
or Web page (to which the hyperlink is linked) opens in a new <TABLE BORDER=1>
window. On the other hand, internal linking allows you to link <TR>
different sections of the same Web page as well as different <TD> A </TD>
sections of different Web pages. <TD> B </TD>
18. What do you understand by a table? Which tag is <TD> C </TD>
</TR>
used to create a table in HTML? <TR>
Ans. According to W3C “The HTML table model allows authors to <TD> D </TD>
arrange data – text, preformatted text, images, links, forms, <TD> E </TD>
form fields, other tables, etc. – into rows and columns of cells.” <TD> F </TD>
C 103 Sheetal 19 19 17 55
104 Aman 18 17 20 55
Ans.
B <HTML>
<HEAD>
D <TITLE>
</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=1>