HTML/XHTML Test Answer Part-02

21. Which of the following values is/are valid for the align attribute of a tag?

a.left 
b.right 
 
c.center

d. offset

22. Which of the following is/are a valid value for the type attribute of the input tag?
a. text
b. icon
c. reset 
d. password

23. 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?

a.  It will allow the user to choose only the male and the married options

b.  It will allow the user to choose only the female and single options

c.  It will allow the user to choose only one option out of the four *

d.  It will allow the user to choose all the four options at the same time

24. You specified a base tag and anchors as follows:

1. <.base target=”_blank”>
2. <.a href=”.http://www.yahoo.com”>Yahoo
3. <.a href=”.http://www.google.com” target=”_top”>Google
Which of the following is true for the above code?

a. Only the Yahoo link will open in a new window *

b. Only the Google link will open in a new window

c.  Both links will open in a new window

d.  Both links will open in the same window

25. Within a table cell “<.td>.”:a. <.p> tags can’t be usedb. <.ol> tags can’t be used

c. <.table> tags can’t be used

d. <.form> tags can’t be used

e. All the above tags can be used*

26. Which of the following is not correct for a <.meta> tag?

a. It is more useful if it is placed in a head element

b. It can be used to specify the keywords for the search engines

c. It can be used to redirect users to other URLs

d. It is mandatory to specify the name or scheme attributes *

27. 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. Secondary<./option>
10. <./select>

Which of the following options is true with regard to this XHTML document?

a. The syntax of the input tag at line 3 is incorrect

b. The readonly attribute in line 5 is not correctly coded * 

c. The syntax of the select tag is not correct

d. Maxlength cannot be specified with text boxes

28. 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” />* 

b. <.meta http=”.refresh” url=”www.newurl.com” />

c. <.meta scheme=”.refresh” name=”redirect” http=”.www.newurl.com” />

d. <.meta http-equiv=”.redirect” content=”3″ http=”.www.newurl.com” />

29. 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 * 

b. xmlns means html-xml number sequence

c. Elimination of xmlns tag will result in the document not being validated by a w3.org validator

d. The page will not be displayed properly if the URL is changed to “http://www.w3.org/1999/xhtml”

30. Which of the following is correct about the <.!DOCTYPE …> tag? 

a. It is not considered to be mandatory as per the XHTML specification

b. It must have a closing tag

c. It should come just after the

d. Its declaration is not a part of the XHTML document itself

e. None of the above* 

31. Which of the following statements is true about the table header, body and footer tags?

a. The table header, body and footer tags are <.tablehead>, <.tablebody> and <.tablefoot> respectively

b. The table header, body and footer tags are <.tabhead>, <.tabbody> and <.tabfoot> respectively

c. It is recommended to first specify the table header followed by the footer and then the body tag

d. None of the above * 

32. 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?

a. <.textarea rows=”8″ cols=.”20″> Your comments ….<./textarea>*

b. <.textarea row=”8″ col=.”20″> Your comments ….<./textarea>

c. <.textarea rowcount=.”8″ colcount=.”20″> Your comments ….<./textarea>

d. <.input type=”text” maxlength=.”100″ />

33. Which attribute specifies the submit URL in a form?

a. method

b. Action *

c. name

d. id

34. 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? 

a. <.a url=”#.target4″>Check Old Listing as well<./a>

b. <.a href=”.#target4″>Check Old Listing as well<./a>

c. <.link url=”.target4″>Check Old Listing as well<./link>

d. <.a href=”.Listing.target4″>Check Old Listing as well<./a>

35. What do you understand by cellspacing?

a. It makes the cell span more than one column

b. It specifies the space between the cell wall and the contents of the cell

c. It specifies the space between two cells

d. It makes the cell span more than one row

36. What do you understand by cellpadding?

a. It makes the cell span more than one column

b. It specifies the space between the cell wall and the contents of the cell *

c. It specifies the space between two cells

d. It makes the cell span more than one row

37. Which of the following is correct regarding the frame attribute of the table tag?

a. It is used to add a frame to the table *

b. A “hsides” frame attribute will show the border lines for horizontal sides of the table only

c. A “hsides” frame attribute will not show the border lines for horizontal sides of the table only

d. A “hsides” frame attribute will add a scrollable frame on the horizontal sides of the table

38. Your browser supports bidirectional text. Which tag will you use if you need to display text from right to left?

a. <.opposite>Text should go in opposite direction<./opposite>

b. <.p direction=”rtl”>Text should go in opposite direction<./p>

c. <.bdo dir=”rtl”>Text should go in opposite direction<./bdo>*

d. <.text dir=”rtl”>Text should go in opposite direction<./text>

39. How will you import a style sheet named “basic.css” in your web page?

a. <.import name=”.stylesheet” url=”.basic.css”>

b. <.link rel=”.stylesheet” type=”text/css” href=.”basic.css”/> *

c. <.style name=”.stylesheet” url=.”basic.css”>

d. <.link item=”.stylesheet” type=”text/css” href=.”basic.css”>

40. This question is based upon the figure shown below

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?

a. <.tr>
<.th>Customer Name<./th>
<.th colspan=3>Contact<./th>
<./tr>

b. <.tr>

<.th>Customer Name<./th>

<.th cellpadding=3>Contact<./th>

<./tr>

c. <.tr>

<.th>Customer Name<./th>

<.th rowspan=3>Contact<./th>

<./tr>

d. <.tr>

<.th>Customer Name<./th>

<.th cellspacing=3>Contact<./th>

<./tr>

e. <.tr>

Customer Name<./th>

<.th cellpadding=3>Contact<./th>

<./tr>

Comments

comments

2 Comments

Leave a Comment

Time limit is exhausted. Please reload CAPTCHA.