Question 1
Which tag is used to insert an image in a web page?
<SRC>
<IM>
<IMG>
- None of these
Answer
<IMG>
Reason — <IMG>
tag is used to insert an image in a web page.
Question 2
Which attribute of the <IMG>
tag allows you to display a text instead of an image?
- Alt
- Image
- Alternate
- Border
Answer
Alt
Reason — The Alt attribute can display a phrase instead of the image, in case the image cannot be displayed by the browser.
Question 3
You can use the ............... attribute to control the horizontal space around an image.
- Hspace
- Rspace
- Lspace
- None of these
Answer
Hspace
Reason — You can use the Hspace attribute to control the horizontal space around an image.
Question 4
We can present data in a row and column format by using the ............... tag.
<TR><TC>
<TABLE>
<ROW><COL>
- None of these
Answer
<TABLE>
Reason — We can present data in a row and column format by using the <TABLE>
tag.
Question 5
The column heading is specified by using the ............... tag.
<CH>
<TR>
<TH>
<TD>
Answer
<TH>
Reason — The column heading is specified by using the <TH>
tag.
Question 6
<TR>
tag is used to create a ............... in a table.
- Row
- Column
- Caption
- All of these
Answer
Row
Reason — <TR>
tag is used to create a row in a table.
Question 7
............... tag defines the cells or columns of a table which denotes table data.
<TR>
<TD>
<TH>
- None of these
Answer
<TD>
Reason — <TD>
tag defines the cells or columns of a table which denotes table data.
Question 8
Which attribute is used to set the amount of space between the cell border and the cell data?
- Spacing
- Cellpadding
- Cellspacing
- Align
Answer
Cellpadding
Reason — Cellpadding attribute is used to set the amount of space between the cell border and the cell data.
Question 9
The default alignment of the contents of table cells is ............... .
- Center
- Right
- Top
- Left
Answer
Left
Reason — The default alignment of the contents of table cells is left.
Question 10
Choose the correct HTML code to right-align the data inside a table cell.
<TRright Align>
<TD Align ="Right">
<TD VAlign ="Right">
<TR "Right">
Answer
<TD Align ="Right">
Question 11
Which is the correct code to merge four columns in a table?
<TD COLSPAN = 4>
<TD COLUMN SPAN= 4>
<COLSPAN = 4>
<TD SPAN = 4>
Answer
<TD COLSPAN = 4>
Reason — The correct HTML code to merge four columns in a table is as follows:
<TD COLSPAN = 4>
Question 12
Which of the following is not the attribute of <A>
tag?
- NAME
- TITLE
- HREF
- SRC
Answer
SRC
Reason — SRC is not the attribute of <A>
tag. The other attributes of <A>
tag are used for the following purposes:
- HREF — It defines the document to which the link leads.
- TITLE — It is used to give a title to the document to which we are linking.
- NAME — It specifies the name of the anchor being set up for internal linking in a document.
Question 13
Combining two or more cells either column-wise or row-wise in a table is called ............... .
- Merging
- Spanning
- Combining
- None of these
Answer
Spanning
Reason — Combining two or more cells either column-wise or row-wise in a table is called Spanning.
Question 14
The two common attributes of the <IMG>
and the <TABLE>
tags are ............... .
- SRC and HEIGHT
- HEIGHT and WIDTH
- BORDER and SRC
- They do not have any common attributes
Answer
They do not have any common attributes
Reason — The <IMG>
and the <TABLE>
tags do not have any common attributes.
Question 15
Why is it important to specify width and height attribute in <IMG>
tag?
- To ensure that the image is not copied.
- The image will not render without these.
- To stop the image from loading.
- Helps the browser to load the web page faster.
Answer
Helps the browser to load the web page faster.
Reason — It is important to specify width and height attribute in <IMG>
tag so that the browser can reserve the space for the images when the page is loaded.
Question 16
Which command should we use to link a page with an HTML page?
<A Link= "page.htm"> </a>
<A Href = "page.htm">page</a>
<A Connect= "page.htm"></a>
<A Attach="page.htm" > </a>
Answer
<A Href = "page.htm">page</a>
Reason — We can use the following command to link a page with an HTML page :
<A Href = "page.htm">page</a>
Question 17
Which attribute(s) is/are used to merge rows?
- Rowspan
- Colspan
- Both 1 and 2
- None of these
Answer
Rowspan
Reason — Rowspan attribute is used to merge rows.
Question 18
What is the correct syntax in HTML for creating a link to an e-mail address?
<A Href = "E-mail.htm">
<A e-mail:to@address>
<A Href="mailto:e-mail_id">
- None of these
Answer
<A Href="mailto:e-mail_id">
Reason — The correct syntax in HTML for creating a link to an e-mail address is as follows:
<A Href="mailto:e-mail_id">
0 Comments
Please do note create link post in comment section