HTML 4.01 Test & Answer in Odesk
Which
of the following statements is correct for a blockquote?
b. It defines the start of a long quote.
b. It defines the start of a long quote.
Which
of the following tags can be used in place of a button tag?
c. input
c. input
It
is not necessary to give the coordinates for an image or object defined within
an area tag, if the value of its shape attribute is:
c. default
c. default
Which
of the following is/are a valid value for the type attribute of the input tag?
text
c. reset
d. password
c. reset
d. password
Ans:
a. text, c. reset, d. password
Which
of the following is not correct for an action attribute for a form tag?
a.The
action attribute can be defined at runtime.
b. If the value for action is null (action=""), then the form submits user data to itself.
c. If the URL is not provided to the action attribute, the form will not submit user data anywhere.
d. None of the above
b. If the value for action is null (action=""), then the form submits user data to itself.
c. If the URL is not provided to the action attribute, the form will not submit user data anywhere.
d. None of the above
Ans:d.
None of the above
Which
of the following values is/are valid for the align attribute of a tag?
left
b. right
c. center
Ans: a. left, b. right, c. center
b. right
c. center
Ans: a. left, b. right, c. center
Which
of the following is incorrect about the relation between HTML and XHTML?
b.
XHTML is almost identical to HTML 4.01.
Choose
the incorrect statement(s):
b.
HTML is case sensitive.
Which
of the following is not a valid input type of the form tag?
checkbox
b. image
c. hidden
d. button
e. All are valid
b. image
c. hidden
d. button
e. All are valid
e.
All are valid
What
do you infer from the following code? <a href =
"http://www.expertrating.com"> Expert Rating
This
href is using absolute path for linking.
Which
of the following is/are not true for a paragraph tag in HTML 4.01?
b. It creates an empty line above its starting line.
c. It cannot be used within a <td> tag.
Ans: b, C
b. It creates an empty line above its starting line.
c. It cannot be used within a <td> tag.
Ans: b, C
A
piece of text contains many blank spaces within it. Which of the following tags
would be suitable to display the text as it was originally formatted?
d.
pre
You
are creating several web pages for a website that contain several rather large
data tables, many of which are somewhat similar in the number of columns, rows,
and in other common table formatting. In addition, CSS will be employed for
formatting the tables. Which one of the following types of CSS has the highest
priority over the others and typically requires the greatest total amount of
code space for the entire website for formatting the various <td> table
cells?
External
style sheet
Which
of the following attributes is/are related to the <img> tag?
d.
All of the above
The
following link is placed on an HTML webpage.
<a href="http://msdn.com/" target="_blank"> MSDN </a>
What do you infer from it?
<a href="http://msdn.com/" target="_blank"> MSDN </a>
What do you infer from it?
b.
It will open the site msdn.com in a new window.
Is
the following code valid in HTML 4.01 Strict?
<ul><li><ol><li>A</li><li>B</li><ul><li>Item1</li><li>Item 2</li></ul><li>C</li></ol></li></ul>
<ul><li><ol><li>A</li><li>B</li><ul><li>Item1</li><li>Item 2</li></ul><li>C</li></ol></li></ul>
Perfectly
valid.
Which
of the following is/are not correct for a <meta> tag in HTML 4.01?
d.
It is mandatory to specify its name or scheme attributes.
The
tag that is used to pass the parameters to an applet is:
c. Param
Which
of the following attributes is/are valid for a select tag contained within a
form tag?
d.
All of the above
For
the following items of a <select> list:
<option value="89">Item 1</option>
<option value="90">Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
<option value="89">Item 1</option>
<option value="90">Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
b.
90
Which
of the following shows the basic tag structure of an HTML document?
c.
<html><head></head><body></body></html>
You
want to provide a form field to the users for writing lengthy comments on the
quality of the services provided by you. Which of the following tags will you
use?
d.
<input type="text" maxlength="100"/>
Which
of the following set of coordinate values refers to an image defined by the
area tag with the value of poly for its shape attribute?
b.
coords="150,190,150,110"
What
is meant by the cellspacing attribute?
c.
It specifies the space between two cells
Which
of the following attributes comes in handy when borders have to be put between
groups of columns instead of every column?
b.
colgroup
A
few lines in an HTML paragraph are to be formatted differently from the rest of
the lines. Which tag will assist in this?
b.
p
How
will you specify a comment in an HTML document?
c.
<!-- Here is a comment.. -->
Which
of the following is correct regarding the frame attribute in the <table>
tag?
b.
A hsides value for the frame attribute will show the border lines for
horizontal sides only.
What
is meant by cellpadding?
b. It specifies the space between the cell wall and the contents of the cell.
b. It specifies the space between the cell wall and the contents of the cell.
Within
a table cell <td>:
e.
All the above tags could be used.
You
want to display a table listing out customer names and their contact
information. The heading of the table is shown in the figure. What is the code
for creating the first line of the table heading?
b.
<tr>
<th>Customer Name</th>
<th cellpadding=3>Contact</th>
</tr>
<th>Customer Name</th>
<th cellpadding=3>Contact</th>
</tr>
What
would you infer from the following code in an HTML 4.01 Web site? <body
topmargin=2 leftmargin=2>
The
top margin and left margin of the webpage is 2 pixels.
You
specified a base tag and anchors as follows:
1. <base target="_blank">
2. <a href="http://www.yahoo.com">Yahoo</a>
3. <a href="http://www.google.com" target="_top">Google</a>
Which of the following is true for the above code?
1. <base target="_blank">
2. <a href="http://www.yahoo.com">Yahoo</a>
3. <a href="http://www.google.com" target="_top">Google</a>
Which of the following is true for the above code?
c.
Both links will open in a new window.
On
one of your Web pages named Listing.html, you specified a target like this:
<a name="target4">Old Listing</a>
How will you make a link to the above target?
<a name="target4">Old Listing</a>
How will you make a link to the above target?
b.
<a href="#target4">Check Old Listing as well</a>
The
tag which is used to show monospaced text is:
b.
<th>
Which of the following values for the scrolling attribute for the frame tag is not valid?
d. no
A developer wrote this image tag:
<img src ="states.gif" width ="330" height ="406" alt="States"
usemap ="#statemap" />
What code should follow this?
a. <map id ="statemap" name="statemap">
<area shape ="rect" coords ="0,0,82,126" href="state1.htm"
alt="State1" />
</map>
The tag that is used to pass the parameters to anapplet is:
c. param
Which of the following statements is correct for the tag?
d. It places an empty line after the text.
What is the character entity representation of the ‘less than’ sign (its entity name is ‘<’) ?
b. <
You want to create a link for your website allowing users to email the webmaster. How will you implement this if the
webmaster’s email is “webmaster@xcompany.com”?
a. <a href=”mailto:webmaster@xcompany.com”>webmaster</a>
You have to add a list of products in a drop-down list. What will you use to group the identical products under a category
name?
a. Optgroup
How will you specify a comment in an XHTML document?
c. <!– Here is a comment.. –>
Which of the following is true for the “<param>” tag?
a. It doesn’t need a closing tag
How will you specify the language attribute in XHTML?
a. <div lang=”en” xml:lang=”en”>Listing A</div>
Which of the following is incorrect with regard to the <select> tag?
d. The text specified in the “value” is displayed in the drop-down list
Which of the following lines will be allowed by an XHTML parser?
d. New Horizontal line <hr />
You are developing a website. In one of the subscription forms, you need to get the subscription start date from the user.
The HTML code is as follows:
Day <input type=”text” size=”3? />
Month <input type=”text” size=”10? />
Year <input type=”text” size=”4? />
Which of the following will you use if you want to put these 3 text fields together in a box?
c. <fieldset>
Which of the following is correct for an image?
d. The height and width attributes allow resizing the image on the webpage
A <doctype> defines the document type of any XHTML document. It can be of three types:
a. Strict, Transitional, and Frameset
Which of the following statements is correct with regard to DTDs?
d. All of the above
Which of these tags will create a single space character?
c.
Which of the following statements is correct for the <blockquote> tag?
a. The text under blockquote must be enclosed in a block level element in a strict DTD document
A developer wrote this image tag:
<img src =”states.gif” width =”330? height =”406? alt=”States” usemap =”#statemap” />
What code should follow this?
a. <map id =”statemap” name=”statemap”>
<area shape =”rect”
coords =”0,0,82,126? href=”state1.htm” alt=”State1? /> </map>
Which attributes of the <table> tag is deprecated in HTML 4.01 and not supported in strict DTD XHTML?
a. Align
b. bgcolor
Ans: a & b
Which of the following represents the basic tag structure of an XHTML document?
c. <html><head></head><body></body></html>
Please choose the most appropriate option.
One of the differences between XHTML and HTML 4.01 is that the “name” attribute has been replaced by the “id” attribute in:
c. map and frame tags
You have defined the following image in an XHTML document:
<img src=”/image/logo.gif” id=”img1? />
b. The code will work properly in a browser that supports both HTML 4.x and XHTML
What do you understand by cellspacing?
c. It specifies the space between two cells
Which of the following statements is true about the table header, body and footer tags?
c. It is recommended to first specify the table header followed by the footer and then the body tag
Which attribute specifies the submit URL in a form?
b. Action
Which of the following is not correct for a <meta> tag?
d. It is mandatory to specify the name or scheme attributes
What do you understand by
the following line of code?
<html xmlns=”http://www.w3.org/TR/REC-xml-names”>
a. xmlns specifies the URL to qualify the names used in the XHTML document
<html xmlns=”http://www.w3.org/TR/REC-xml-names”>
a. xmlns specifies the URL to qualify the names used in the XHTML document
The following registration form was coded by a programmer in XHTML:
1. <!– Start of the Form Fields –>
2. Name:
3. <input type=”text” name=”name” maxlength=”50? />
4. Registration Date:
5. <input readonly type=”text” value=”javascript:getDate();” />
6. Account Type:
7. <select name=”Account”>
8. <option “selected” value=”Primary”>Primary</option>
9. <option value=”Secondary”>Secondary</option>
10. </select>
Which of the following options is true with regard to this XHTML document?
b. The readonly attribute in line 5 is not correctly coded
Take a look at the following code:
<html>
<head>
<title>HTML AND XHML</title>
<body>
<h1>Defining HTML
</body>
What will happen when you run this code in the browser?
c. With a .xhtml extension, the page will be displayed with errors
On one of your web pages named “Listing.xhtml” you specified a target like this:
<a name=”target4?>Old Listing</a>
How will you make a link to the above target?
b. <a href=”#target4?>Check Old Listing as well</a>
You placed four radio buttons on a web form. You want the users to specify whether they are male or female and whether
they are married or single. The code is as follows:
Male: <input type=”radio” checked=”checked” name=”chk” value=”male” />
Female: <input type=”radio” name=”chk” value=”female” />
Married: <input type=”radio” checked=”checked” name=”chk” value=”married” />
Single: <input type=”radio” name=”chk” value=”single” />
What is wrong with the above code?
b. It will allow the user to choose only the female and single options
Which of the following is correct regarding the frame attribute of the table tag?
b. A “hsides” frame attribute will show the border lines for horizontal sides of the table only
Which of the following is correct about the <!DOCTYPE …> tag?
e. None of the above
What do you understand by cellpadding?
b. It specifies the space between the cell wall and the contents of the cell
Your website has moved to some other address. How will you automatically redirect a user to that address within 3 seconds of landing on the old address?
a. <meta http-equiv=”refresh” content=”3; url=http://www.newurl.com” />
Your browser supports bidirectional text. Which tag will you use if you need to display text from right to left?
c. <bdo dir=”rtl”>Text should go in opposite direction</bdo>
While writing a strict DTD XHTML document, you want to create a table having 2 columns, both left aligned. What technique will you choose to do this?
b. <table border=”1?>
<tr><td
align=”left”>Plan A</td>
<td
align=”left”>Monthly payment of $60</td>
</tr>
. . .
. . .
</table>
. . .
. . .
</table>
Within
a table cell “<td>”:
e. All the above tags can be used
e. All the above tags can be used
While designing the links page of your website, you want the link to open in a new window. How will you implement this with XHTML using Transitional doc type?
d. <a href=”http://www.mailer.com” target=”_blank”>Mailer</a>
How will you import a style sheet named “basic.css” in your web page?
b. <link rel=”stylesheet” type=”text/css” href=”basic.css”/>
Which
of the following is/are not true for a paragraph tag inHTML 4.01?
b. It creates an empty line above its starting line.
c. It cannot be used within a <td> tag.
b. It creates an empty line above its starting line.
c. It cannot be used within a <td> tag.
b,
C
Which
of the following is/are not correct for a <meta> tag inHTML 4.01?
d.
It is mandatory to specify its name or scheme attributes.
You are developing a website. In one of the subscription forms, you need to get the subscription start date from the user.
The HTML code is as
follows:
Day <input type=”text”
size=”3? />
Month <input type=”text”
size=”10? />
Year <input type=”text”
size=”4? />
Which of the following will
you use if you want to put these 3 text fields together in a box?
c. <fieldset>
c. <fieldset>
Which of the following font styling tag is not valid?
<b>
Which form event is fired on the click of a button using a button tag with its type attribute value equal to submit?
Onsubmit
Which of the following is invalid value for the shape attribute of an area tag?
Tri
What is the character-entity representation of the "less than" sign (<)?
60;#
Which of the following statements is correct for the <blockquote> tag?
The
Attribute named cite must be specified.
Which of the following is/are not valid?
<h>Main
Title</h>
Where must the styles specified for a CSS internal style sheet be located?
anywhere
on the webpage
Which of the following is true for the <colgroup> tag?
Answers is: It is
useful for applying similar formatting to the grouped columns.
Which of the following is true for the <param> tag in HTML 4.01?
Which of the following is true for the <param> tag in HTML 4.01?
Answers
is: It does need a closing tag.
A <!DOCTYPE> defines the document type of any HTML document. It can be of three types:
A <!DOCTYPE> defines the document type of any HTML document. It can be of three types:
Answers
is: Fixed, Intermediate, or Frameset
You are designing a website for one of your clients. You have to use an applet named cal.class to show a scrollable calendar. Which of the following is the recommended way of calling it if you are using HTML 4.01?
Answers
is: <object classid="APPID"
id="cal" width="180"
height="180"></object>
How does a button created by the <button> tag differ from the one created by an <input> tag?
Answers
is: A button tag button can be a reset button too.
Which of the following would give a yellow background to the web page?
Note: The code used in the "correct" answer below was deprecated in HTML 4.01! Use styles instead for new code.
Answers
is: <body color="Yellow">
Which of the following attributes is/are not associated with textarea tag in W3C standard HTML 4.01?
Answers
is: Name
Your website has moved to some other address. What HTML 4.01 code would automatically redirect a user to that address within 3 seconds of landing on the old address?
Answers
is: <meta scheme="refresh"
name="redirect" http="www.newurl.com">
While designing the links page of your website, you want the link to open in a new browser window. How will you implement this with HTML?
While designing the links page of your website, you want the link to open in a new browser window. How will you implement this with HTML?
Answers
is: <anchor href=http://www.mailer.com
target=_blank>Mailer</anchor>
Your browser supports bidirectional text. Which tag below will you use if you need to display text from right to left?
Answers
is: <p direction="rtl">Text should go
in opposite direction</p>
You do not want the user to resize the frame. The code should be:
You do not want the user to resize the frame. The code should be:
Answers
is: <frame src="MyPage.html" name="Homepage"
scrolling=yes noresize="noresize">
View the following code:
<html>
<frameset cols = "20%, 20%,*">
<frame src ="a.html"/><frame src ="b.html" /><frame src ="c.html" />
</frameset>
</html>
What will be displayed on viewing the above in a browser?
Answers is:
An HTML page with the last column occupying 60% space.
Which
of The Question Ans is: following font styling tag is not valid?
an
answer is: c. <b>
Which
form event is fired on The Question Ans is: click of a button using a button
tag with its type attribute value equal to submit?
answers
is: b. on submit
Which
of The Question Ans is: following tags can be used in place of a button tag?
answers
are: c. input
Which
of the Question Ans is: following is invalid value for The Question Ans is:
shape attribute of an area tag?
answers
is: b. tri
What
is The Question Ans is: character-entity representation of The Question Ans is:
"less than" sign
(<)?
answers
is: a. 60;#
Which
of the Question Ans is: following statements is correct for The Question Ans
is: <blockquote> tag?
answers
is: b. The Question Ans is: attribute named cite
must be specified.
Which
of The Question -following is/are not valid?
answers
is: b. <h>Main Title</h>
Where
The Question Ans must is: styles specified for a CSS internal style sheet be
located?
answers
is: d. Anywhere on The Question Ans is: webpage
Which
of the Question Ans is: following is true for The Question Ans is: <colgroup>
tag?
answers
are: b. It is useful for applying similar
formatting to The Question Ans is: grouped columns.
Which
of The Question Ans is: following is true for The Question Ans is:
<param> tag in HTML 4.01?
answers
are: a. It does need a closing tag.
This
question is based upon The Question Ans is: figure shown below
You
want to display a
table listing out customer names and The Question Ans is:ir contact information. The Question
Ans is: heading of The Question Ans is: table is shown in The Question Ans is:
figure. What is The Question Ans is: code for creating The Question Ans is:
first line of The Question Ans is: table heading?
an
answer is: b. <tr>
<th>Customer
Name</th>
<th
colspan=3>Contact</th>
</tr>
It
is not necessary to give The Question Ans is: coordinates for an image or
object defined within an area tag, if The Question Ans is: value of its shape
attribute is:
answers
is: c. default
A
<! DOCTYPE> defines The Question Ans is: document type of any HTML
document. It can be of three types:
answers
is: d. Fixed, Intermediate, or Frameset
You
are designing a website for one of your clients. You have to use an applet
named cal.class to show a scrollable calendar. Which of The Question Ans is:
following is The Question Ans is: recommended way of calling it if you are
using HTML 4.01?
answers
is: c. <object classid="APPID"
id="cal" width="180"
height="180"></object>
How
does a button created by The Question Ans is: <button> tag differs from
The Question Ans is: one created by an <input> tag?
answers
is: b. A button tag button can be a reset button
too.
Which
of the Question Ans is: following would give a yellow background to The
Question Ans is: web page?
Note:
The Question Ans is: code used in The Question Ans is: "correct"
answer below was deprecated in HTML 4.01! Use styles instead for new code.
answers
is: d. <body color="Yellow">
Which
of The Question Ans is: following attributes is/are not associated with
textarea tag in W3C standard HTML 4.01?
answers
is: c. name
Which
of the Question Ans is: following is correct regarding The Question Ans is:
frame attribute in The Question Ans is: <table> tag?
answers
is: c. A hsides value for The Question Ans is:
frame attribute will not show The Question Ans is: border lines for horizontal
sides only.
Which
of The Question Ans is: following attributes is/are related to The Question Ans
is: <img> tag?
answers
is: d. all of The Question Ans is: above
Which
of The Question Ans is: following is/are a valid value for The Question Ans is:
type attribute of The Question Ans is: input tag?
answers
is: b. icon
Which
of The Question Ans is: following statements is correct for a blockquote?
The
Question -answers is: b. It defines The Question Ans is: start of a
long quote.
Your
website has moved to some oThe Question Ans is:r address. What HTML 4.01 code
would automatically redirect a user to that address within 3 seconds of landing
on The Question Ans is: old address?
answers
is: c. <meta scheme="refresh"
name="redirect" http="www.newurl.com">
Which
of The Question Ans is: following set of coordinate values refers to an image
defined by The Question Ans is: area tag with The Question Ans is: value of
poly for its shape attribute?
-answers
is: b. coords="150,190,150,110"
While
designing The Question Ans is: links page of your website, you want The
Question Ans is: link to open in a new browser window. How will you implement
this with HTML?
answers
are b. <anchor href=http://www.mailer.com
target=_blank>Mailer</anchor>
Which
of The Question Ans is: following is incorrect about The Question Ans is:
relation between HTML and XHTML?
answers
is: c. XHTML and HTML both are used to generate
dynamic content.
Your
browser supports bidirectional text. Which tag below will you use if you need
to display text from right to left?
answers
is: b. <p direction="rtl">Text
should go in opposite direction</p>
You
do not want The Question Ans is: user to resize The Question Ans is: frame. The
Question Ans is: code should be:
answers
is: d. <frame src="MyPage.html"
name="Homepage" scrolling=yes noresize="noresize">
The
Question Ans is:tag that is used to pass The Question Ans is: parameters to an
applet are:
answers
is: b. applet
You
want to create a link for your website allowing users to email The Question Ans
is: webmaster. How will you implement this if The Question Ans is: webmaster's
email address is webmaster@xcompany.com?
answers
is: e. <a
href="mailto://webmaster@xcompany.com">webmaster</a>
Which
attribute(s) of The Question Ans is: <table> tag is/are deprecated in
HTML 4.01?
answers
are: c. bgcolor and align
You
want to provide a form field to The Question Ans is: users for writing lengthy
a comment on The Question Ans is: quality of The Question Ans is: services
provided by you. Which of The Question Ans is:
answers
are: c. <textarea rowcount="8"
colcount="20"> Your comments....
</textarea>
View
The Question Ans is: following code:
answers
are: c. An HTML page with The Question Ans is:
last column occupying 60% space.
Which of the following font styling tag is not valid?
the answers is: c. <b>
Which form event is fired on the click of a button using a button tag with its type attribute value equal to submit?
the answers is: b. onsubmit
Which of the following is invalid value for the shape attribute of an area tag?
the answers is: b. tri
What is the character-entity representation of the “less than” sign (<)?
the answers is: a. 60;#
Which of the following statements is correct for the <blockquote> tag?
the answers is: b. The
attribute named cite must be specified.
A developer wrote this image tag:
<img src =”states.gif” width =”330″ height =”406″
alt=”States”
usemap =”#statemap” />
usemap =”#statemap” />
What code should follow this?
the answers is: c. <map id
=”statemap” name=”statemap”>
<imgarea shape =”rect” coords =”0,0,82,126″ href=”state1.htm”
alt=”State1″ /></map>
<imgarea shape =”rect” coords =”0,0,82,126″ href=”state1.htm”
alt=”State1″ /></map>
Which of the following is/are not valid?
the answers is: b.
<h>Main Title</h>
Where must the styles specified for a CSS internal style sheet be located?
the answers is: d. Anywhere on
the webpage
Which of the following is true for the <colgroup> tag?
the answers is: b. It is
useful for applying similar formatting to the grouped columns.
A <!DOCTYPE> defines the document type of any HTML document. It can be of three types:
the answers is: d. Fixed,
Intermediate, or Frameset
You are designing a website for one of your clients. You have to use an applet named cal.class to show a scrollable calendar. Which of the following is the recommended way of calling it if you are using HTML 4.01?
the answers is: c. <object
classid=”APPID” id=”cal” width=”180″ height=”180″></object>
How does a button created by the <button> tag differ from the one created by an <input> tag?
the answers is: b. A button
tag button can be a reset button too.
Which of the following would give a yellow background to the web page?
Note: The code used in the “correct” answer below was deprecated in HTML 4.01! Use styles instead for new code.
the answers is: d. <body
color=”Yellow”>
Which of the following attributes is/are not associated with textarea tag in W3C standard HTML 4.01?
the answers is: c. name
Your website has moved to some other address. What HTML 4.01 code would automatically redirect a user to that address within 3 seconds of landing on the old address?
the answers is: c. <meta
scheme=”refresh” name=”redirect” http=”www.newurl.com”>
While designing the links page of your website, you want the link to open in a new browser window. How will you implement this with HTML?
the answers is: b. <anchor
href=http://www.mailer.com target=_blank>Mailer</anchor>
Your browser supports bidirectional text. Which tag below will you use if you need to display text from right to left?
the answers is: b. <p
direction=”rtl”>Text should go in opposite direction</p>
You do not want the user to resize the frame. The code should be:
the answers is: d. <frame
src=”MyPage.html” name=”Homepage” scrolling=yes noresize=”noresize”>
Which attribute(s) of the <table> tag is/are deprecated in HTML 4.01?
the answers is: c. bgcolor and
align
View the following code:
<html>
<frameset cols = “20%, 20%,*”>
<frame src =”a.html”/><frame src =”b.html” /><frame src =”c.html” />
</frameset>
</html>
<frameset cols = “20%, 20%,*”>
<frame src =”a.html”/><frame src =”b.html” /><frame src =”c.html” />
</frameset>
</html>
What will be displayed on viewing the above in a browser?
the answers is: c. An HTML
page with the last column occupying 60% space.
Prepared By,
Mir Rashedul Islam
Mir Rashedul Islam
rashedulbd.2010@engineer.com