Thursday, April 17, 2014

Elance HTML Test Questions

Question: 1. Which of the following font styling tag is not valid?

a.<Small>
b.<i>
c.<b>
d.<big>
e.<Large>


Question: 2. Which form event is fired on the click of a button using a button tag with its type attribute value equal to submit?

a.Onload
b.Onsubmit
c.Onunload 
d.Onreset


Question: 3. Which of the following tags can be used in place of a button tag?

a.Legend
b.Ol
c.Input
d.Dl


Question: 4. Which of the following is invalid value for the shape attribute of an area tag?

a.Circle
b.Tri
c.Rect
d.Poly


Question: 5. What is the character-entity representation of the "less than" sign (<)?

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


Question: 6. Which of the following statements is correct for the <blockquote> tag?

a.The text under block quote 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 places an empty line after the text.
.      

Question: 7.  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="state.html"alt="state1" /></map>
b. <map id ="statemap" name="statemap"></map><area shape ="rect" coords ="0,0,82,126" href="state1.htm"alt="State1" />
c. <map id ="statemap" name="statemap"><imgarea shape ="rect" coords ="0,0,82,126" href="state1.htm"alt="State1" /></map>
d. <map id ="statemap" name="statemap"></map><imgarea shape ="rect" coords ="0,0,82,126" href="state1.htm"alt="State1" />


Question: 8. Which of the following is/are not valid?

a.<h2>Main Title</h2>
b.<h>Main Title</h>
c.<h3>Main Title</h3>
d.<h7>Main Tile</h7>


Question: 9. Where must the styles specified for a CSS internal style sheet be located?

a.Inside a table tag
b.Inside a div tag
c.Inside the head tag
d.anywhere on the webpage


Question: 10. Which of the following is true for the <colgroup> tag?

a.The attribute named cols specifies the number of columns in colgroup.
b.It is useful for applying similar formatting to the grouped columns.
c.It can be used anywhere between the body tags.
d.It can be inserted in a <td> tag to include that cell to the group.


Question: 11.Is the following code valid in HTML 4.01 Strict?
<ul> <li> <ol> <li>A</li> <li>B</li> <ul> <li>Item 1</li> <li>Item 2</li> </ul> <li>C</li> </ol> </li> </ul>

a.Perfectly valid.
b.Invalid because you should not have three levels of nesting in the lists.
c.Invalid because you should not have an unordered list within an ordered list.
d.Invalid because you should not have an ordered list within an unordered list.
e.Invalid because a <ul> tag should not conflict with an <ol> tag at the same list level.


Question: 12. Which of the following is true for the <param> tag in HTML 4.01?

a.It does 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 attributes can be specified for it.


Question: 13. 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 rowspan=3>Contact</th></tr>
b. <tr><th>Customer Name</th><th colspan=3>Contact</th></tr>
c. <tr><th>Customer Name</th><th cellpadding=3>Contact</th></tr>
d. <tr><th>Customer Name</th><th cellspacing=3>Contact</th></tr>


Question: 14. 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:

a.Circle 
b.Poly
c.Default
d.Rect


Question: 15. A <!DOCTYPE> defines the document type of any HTML document. It can be of three types:

a. Strict, Transitional, or Frameset
b. Strict, Transitional, or Loose
c. Fixed, Intermediate, or Loose
d. Fixed, Intermediate, or Frameset


Question: 16. 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?

a.<applet code="cal" width="180" height="180"></applet>
b.<img src="cal"></img>
c.<object classid="APPID" id="cal" width="180" height="180"></object>
d.<sub id="cal"></sub>


Question: 17. How will you specify a comment in an HTML document?

a.<!!- Here is a comment... -!>
b.<-Here is a comment.. ->
c.<!-- Here is a comment.. -->
d.<! Here is a comment... -!>


Question: 18. 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.<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>


Question: 19.How does a button created by the <button> tag differ from the one created by an <input> tag?

a.An input tag button can be a reset button too.
b.A button tag button can be a reset button too.
c.An input tag button can include images as well.
d.A button tag can include images as well.


Question: 20. 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.

a.<body backcolor="Yellow">
b.<body background="Yellow">
c.<body bgcolor="Yellow">
d.<body color="Yellow">


Question: 21.  Which of the following attributes is/are not associated with textarea tag in W3C standard HTML 4.01?

a. Wrap
b. Cols
c. Name
d. Rows
e. Ref


Question: 22. Which of the following is correct regarding the frame attribute in the <table> tag?

a. It is used to add a frame to the table.
b. A hsides value for the frame attribute will show the border lines for horizontal sides only.
c. A hsides value for the frame attribute will not show the border lines for horizontal sides only.
d. A hsides value for the frame attribute will add a scrollable frame on the horizontal sides.

 
Question: 23.  Which of the following attributes is/are related to the <img> tag?

a. Height
b. Alt
c. Src
d. All of the above
        
        
Question: 24. Which of the following statements is correct for a blockquote?

a. It makes the text a bit bigger for emphasizing.
b. It defines the start of a long quote.
c. It makes the text slightly bolder.


Question: 25. 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?

a. <meta http-equiv="refresh" content="3;url=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">
     

Question: 26. 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?

a. Coords="150,217,190,257,150,297,110,257"
b. Coords="150,190,150,110"
c. Coords="150,217,190,257,150"
d. Coords="150,110,190,220,150,150,120"


Question: 27. 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?

a. <anchor href="http://www.mailer.com">Mailer</anchor>
b. <anchor href=http://www.mailer.com target=_blank>Mailer</anchor>
c. <A HREF="http://www.mailer.com">Mailer </A>
d. <a href="http://www.mailer.com" target="_blank">Mailer</a>

     
Question: 28. 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.

     
Question: 29. Your browser supports bidirectional text. Which tag below 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. <body dir="rtl">Text should go in opposite direction</body>
d. <text dir="rtl">Text should go in opposite direction</text>

     
Question: 30.  Choose the incorrect statement(s):

a. An HTML attribute is additional information included inside a tag.
b. HTML is case sensitive.
c. All the HTML4.01 tags must be paired.

No comments:

Post a Comment