HTML/XHTML Test Answer Part-01

 

1. What is the character entity representation of the ‘less than’ sign (its entity name is ‘<’) ?
a.     60;#

b.    &#60.;
c.     &60#;
d.     #60&;


2. 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

b.     <.a href=”webmaster@xcompany.com”>webmaster

c.     <.a http=”mail:webmaster@xcompany.com”>webmaster

d.     <.mail http=”send:webmaster@xcompany.com”>webmaster

e.     <.a href=”mailto://webmaster@xcompany.com”>webmaster


3. 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
b.     option
c.     menu
d.     var


4. How will you specify a comment in an XHTML document?
a.     <!!– Here is a comment… –!>
b.     <– Here is a comment.. –>
c.     <!– Here is a comment.. –>
d.     <! Here is a comment… –!>


5. Which of the following is true for the <.param.>” tag?
a.     It doesn’t need a closing tag 
b.     The language attribute cannot be specified with it
c.     The name and type attributes are optional
d.     The class, id and title can be specified for it


6. How will you specify the language attribute in XHTML?

a.     <.div lang=”en” xml:lang=”en”>Listing A

b.     <.div language=”en”>Listing A

c.     <.div language=”en” xhtml:lang=”en”>Listing A

d.     <.div xml:language=”en”>Listing A


7. Which of the following is incorrect with regard to the <.select> tag?

a.     The “name” should be specified

b.     The “disabled” attribute disables the drop-down list

c.     The “multiple” attribute allows the user to choose multiple options

d.     The text specified in the “value” is displayed in the drop-down liste.

e.     None of the above


8. Which of the following lines will be allowed by an XHTML parser?

a.     <.p>This is the starting of a new paragraph
b.     <.P>This is the starting of a new paragraph
c.     Here is a break statement
d.     New Horizontal line <.hr /.>

 

9. 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?
a.     <.legend>
b.     <.box>
c.     <.fieldset>
d.     <.area>


10. Which of the following is incorrect about the relation between HTML and XHTML?
a.     XHTML is a stricter and cleaner version of HTML
b.     XHTML is almost identical to HTML 4.01
c.     XHTML and HTML both are used to generate dynamic content 
d.     XHTML brings together the elements of HTML and the syntax of XML


11. Which of the following is correct for an image?
a.     An image must be resized in an editor to fit in the specified space on a webpage
b.     If you have a big image but specify smaller height and width attributes in the 
<.img> tag, only the top   left portion of the image will be displayed in the browser
c.     Both a and b are correct
d.     The height and width attributes allow resizing the image on the webpage 


12.  A defines the document type of any XHTML document. It can be of three types:
a.     Strict, Transitional, and Frameset
b.     Strict, Transitional and Loose
c.     Fixed, Intermediate and Loose
d.     Fixed, Intermediate, Frameset


13. Which of the following statements is correct with regard to DTDs?
a.     A strict DTD allows the user to use cascading style sheets
b.     A transitional DTD displays content in those browsers which don’t support CSS
c.     A frameset DTD is used to partition the browser window
d.     All of the above


14. Which of these tags will create a single space character?

a.     <.td>
b.     <.th>
c.     &.nbsp; 
d.     <.b>  


15. 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
b.     The attribute  named “cite” must be specified
c.     Closing the tag is optional
d.     It doesn’t place an empty line after the text

 

16. 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? />

b.     <.map id =”statemap” name=”statemap”>

c.     <.map id =”statemap” name=”statemap”>

<.imgarea shape =”rect” coords =”0,0,82,126? href=”state1.htm” alt=”State1? />

d.     <.map id =”statemap” name=”statemap”>

<.imgarea shape =”rect” coords =”0,0,82,126? href=”state1.htm” alt=”State1? />

 

17. Which attributes of the tag is deprecated in HTML 4.01 and not supported in strict DTD XHTML?

a.     Align 
b.     bgcolor

c.     cellspacing


18. Which of the following represents the basic tag structure of an XHTML document?
a.     <.html><.head><.body></.body></.html>
b.     <.html><.body></.body><./html>
c.     <.html><.head><./head><.body><./body><./html>  
d.     <.html><.head><./head><./html>


19. 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:
a.     img and applet tags
b.     img and map tags
c.     map and frame tags 
d.     img, map, frame and applet tags
e.     frame, applet, style and map tags


20. You have defined the following image in an XHTML document:

<.img src=”/.image/.logo.gif” id=”.img1? />

a.     The code will only work properly in a browser that supports XHTML
b.     The code will work properly in a browser that supports both HTML 4.x and XHTML
c.     The code will only work properly in a browser that supports HTML 4.x
d.     The code is incorrect, it will not work in any browser

Comments

comments

2 Comments

Leave a Comment

Time limit is exhausted. Please reload CAPTCHA.