oDesk XHTML Test Answers-2014
·
1. A <doctype> defines the
document type of any XHTML document. It can be of three types:
Ans: a. Strict, Transitional, and
Frameset
2. A developer wrote this image
tag:
<img src ="states.gif"
width ="330" height ="406" alt="States" usemap
="#statemap" />
What code should follow this?
Ans: a. <map id ="statemap" name="statemap">
<area shape ="rect" coords ="0,0,82,126" href="state1.htm"
alt="State1" />
</map>
<area shape ="rect" coords ="0,0,82,126" href="state1.htm"
alt="State1" />
</map>
3. How
will you import a style sheet named "basic.css" in your web page?
Ans: b.
<link rel=”stylesheet” type=”text/css” href=”basic.css”
4. How
will you specify a comment in an XHTML document?
Ans: c. <! Here is a comment..-->
5. How will you specify the language
attribute in XHTML?
Ans: a. <div lang="en"
xml:lang="en">Listing A</div>
6. 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?
Ans: b.<a href=”#target4?>Check Old
Listing as well</a>
7. 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:
Ans: d.
img, map, frame and applet tags
8. 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?
Ans: b.
The readonly attribute in line 5 is not
correctly coded
9. What do you understand by cellpadding?
Ans:
b. It specifies the space between
the cell wall and the contents of the cell
10. What do you understand by cellspacing?
Ans: c. It specifies the space between two
cells
11. What do you understand by the following
line of code?
<html
xmlns="http://www.w3.org/TR/REC-xml-names">
Ans: a. xmlns specifies the URL to qualify the
names used in the XHTML document
12. What is the numeric entity representation
of the 'less than' sign (its entity name is '<') ?
Ans: b. <
13. Which attribute specifies the submit URL in
a form?
Ans: b. action
14. Which attributes of the <table> tag
is deprecated in HTML 4.01 and not supported in strict DTD XHTML?
Ans: a. align
b. bgcolor
15. Which of the following statements is correct for the
<blockquote> tag?
Ans: a. The text under block quote must be
enclosed in a block level element in a strict DTD document.
16. Which of the following is correct about the
<!DOCTYPE ...> tag?
Ans: e. None of the above
17. Which of the following is correct for an
image?
Ans: d. The height and width attributes allow
resizing the image on the webpage
18. Which of the following is correct regarding
the frame attribute of the table tag?
Ans: b. A hsides value for the frame attribute
will show the border lines for horizontal sides only.
19. Which of the following is
incorrect about the relation between HTML and XHTML?
Ans: b. XHTML
is almost identical to HTML 4.01.
20. Which of the following is
incorrect with regard to the <select> tag?
Ans: d. The text specified in the
"value" is displayed in the drop-down list
21. Which of the following is not
correct for a <meta> tag?
Ans: a. It is more
useful if it is placed in a head element
22.
Which of the following is true for the "<param>" tag?
Ans:
a. It does need a closing tag.
23.
Which of the following lines will be allowed by an XHTML parser?
Ans:
d. New
Horizontal line <hr/>