Odesk  HTML 4.01 Test Answers 2012-2013



Question: 1
Which of the following font styling tag is not valid?
a.      <Small>
b.     <i>
c.      <b>
d.     <big>
e.      <Large>
Answers is:     <b>

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
Answers is:    Onsubmit       


Question: 3
Which of the following tags can be used in place of a button tag?
a.      Legend
b.     Ol
c.      Input
d.     Dl
Answers is:    Input

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
Answers is:    Tri

Question: 5

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

  1. 60;#
  2. &#60;
  3. &60#;
  4. #60&;
Answers is:     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.
Answers is:    The attribute named cite must be specified.        

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" />
Answers is:    <map id ="statemap" name="statemap"><imgarea shape ="rect" coords ="0,0,82,126" href="state1.htm"alt="State1" /></map>

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>
Answers is:     <h>Main Title</h>

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
Answers is:      Anywhere on the webpage
   
Question: 10
What is meant 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.
  1. It specifies the space between two cells.
  2. It makes the cell span more than one row.
 Answers is:       It specifies the space between the cell wall and the contents of the cell.

Question: 11
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.
Answers is:      It is useful for applying similar formatting to the grouped columns.

Question: 12
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.
Answers is:      Perfectly valid.

Question: 13
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.
Answers is:       It does need a closing tag.

Question: 14
Within a table cell <td>:
a.      <p></p> tags cannot be used.
b.     <ol></ol> tags cannot be used.
c.      <table></table> tags cannot be used.
d.     <form></form> tags cannot be used.
e.      All the above tags could be used.
Answers is:       All the above tags could be used.

Question: 15
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>
Answers is:     <tr><th>Customer Name</th><th colspan=3>Contact</th></tr>

Question: 16
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
Answers is:      Default

Question: 17
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
Answers is:       Fixed, Intermediate, or Frameset

Question: 18
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>
Answers is:       <object classid="APPID" id="cal" width="180" height="180"></object>

Question: 19
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... -!>
Answers is:      <!-- Here is a comment.. -->

Question: 20
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>
Answers is:      <link url="target4">Check Old Listing as well</link>

Question: 21
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.
Answers is:       A button tag button can be a reset button too.

Question: 22
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">
Answers is:       <body color="Yellow">

Question: 23
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
Answers is:        Name

Question: 24
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.
Answers is:       A hsides value for the frame attribute will show the border lines for horizontal sides only.
    
Question: 25
Which of the following attributes is/are related to the <img> tag?
a.      Height
b.     Alt
c.      Src
d.     All of the above
Answers is:        All of the above
        
Question: 26
Which of the following is/are a valid value for the type attribute of the input tag?
  1. Text
  2. Icon
  3. Reset
  4. All of the above
Answers is:       text , c. reset , d. password
        
Question: 27
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.
Answers is:      It defines the start of a long quote.

Question: 28
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">
Answers is:      <meta scheme="refresh" name="redirect" http="www.newurl.com">
        
Question: 29
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"
Answers is:     Coords="150,190,150,110"

Question: 30
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>
Answers is:     <anchor href=http://www.mailer.com target=_blank>Mailer</anchor>
        
Question: 31
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.
Answers is:       XHTML is almost identical to HTML 4.01.
        
Question: 32
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>
Answers is:      <p direction="rtl">Text should go in opposite direction</p>
        
Question: 33
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.
d.     Your browser may appear to correctly use newly deprecated code for the present, but its support for deprecated code could be halted at any time after the browser is updated.
Answers is:      HTML is case sensitive.

Question: 34
You do not want the user to resize the frame. The code should be:
a.      <frame src="MyPage.html" name="Homepage" scrolling=yes resize="false">
b.     <frame src="MyPage.html" name="Homepage" scrolling=yes resize="true">
c.      <frame src="MyPage.html" name="Homepage" scrolling=yes noresize="true">
d.     <frame src="MyPage.html" name="Homepage" scrolling=yes noresize="noresize">
Answers is: <frame src="MyPage.html" name="Homepage" scrolling=yes noresize="noresize">
        
Question: 35
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.      It will open the site msdn.com in the same window.
b.     It will open the site msdn.com in a new window.
c.      It will open the site msdn.com in a frame below.
d.     It will not be clickable as it is not formed correctly.
Answers is:     It will open the site msdn.com in a new window.
        
Question: 36
The tag that is used to pass the parameters to an applet is:
a.      Appletpar
b.     Applet
c.      Param
d.     Val
Answers is:     Applet


Question: 37
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 address is webmaster@xcompany.com?
a.      <a href="mailto:webmaster@xcompany.com">webmaster</a>
b.     <a href="webmaster@xcompany.com">webmaster</a>
c.      <a http="mail:webmaster@xcompany.com">webmaster</a>
d.     <mail http="send:webmaster@xcompany.com">webmaster</mail>
e.      <a href="mailto://webmaster@xcompany.com">webmaster</a>
Answers is:     <a href="mailto://webmaster@xcompany.com">webmaster</a>

Question: 38
Which of the following is not a valid input type of the form tag?
  1. Checkbox
  2. Image
  3. Hidden
  4. Button
  5. All are valid
Answers is:     All are valid

Question: 39
Which of the following is not correct for an action attribute for a form tag?
  1. The action attribute can be defined at runtime.
  2. If the value for action is null (action=""), then the form submits user data to itself.
  3. If the URL is not provided to the action attribute, the form will not submit user data anywhere.
  4. None of the above
Answers is:      None of the above

Question: 40
Which of the following values for the scrolling attribute for the frame tag is not valid?
  1. Yes
  2. Default
  3. Auto
  4. No
Answers is:      No

Question: 41
What is meant by the cellspacing attribute?
  1. It makes the cell span more than one column.
  2. It specifies the space between the cell wall and the contents of the cell.
  3. It specifies the space between two cells.
  4. It makes the cell span more than one row
Answers is:      It specifies the space between two cells.

Question: 42
Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column?
  1. Col
  2. Colgroup
  3. Rowspan
  4. Row
Answers is:       Colgroup

Question: 43
A few lines in an HTML paragraph are to be formatted differently from the rest of the lines. Which tag will assist in this?
  1. Div
  2. P
  3. Span
  4. Format
Answers is:      P

Question: 44
What would you infer from the following code in an HTML 4.01 Web site? <body topmargin=2 leftmargin=2>
  1. The top margin and left margin of the webpage is 2 pixels.
  2. The bottom margin and right margin of the web page is 2 pixels.
  3. Both of the above.
  4. None of the above. The topmargin and leftmargin attributes are not valid HTML 4.01 body attributes.
Answers is:     The top margin and left margin of the webpage is 2 pixels.

Question: 45
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. Only the Yahoo link will open in a new window.
  2. Only the Google link will open in a new window.
  3. Both links will open in a new window.
  4. Both links will open in the same window.
Answers is:      Both links will open in a new window.

Question: 46
Which attribute specifies the submit URL in a form tag?
  1. Method
  2. Action
  3. Name
  4. Id
Answers is:       Action

Question: 47
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?
  1. 89
  2. 90
  3. Item 1
  4. Item 2
Answers is:     90

Question: 48
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?
  1. Optgroup
  2. Option
  3. Menu
  4. Var
  5. There is no way to do this 
Answers is:     Optgroup

Question: 49
Which of the following shows the basic tag structure of an HTML document?
  1. <html><head><body></body></html>
  2. <html><body></body></html>
  3. <html><head></head><body></body></html>
  4. <html><head></head></html>
Answers is:      <html><head></head><body></body></html>

Question: 50
The tag which is used to show monospaced text is:
  1. <td>
  2. <th>
  3. <tt>
  4. <b>
Answers is:     <th>

Question: 51
The tag that is used to pass the parameters to anapplet is:
  1. Appletpar
  2. Applet
  3. Param
  4. Val
Answers is:     Param

Question: 52
Which of the following attributes is/are valid for a select tag contained within a form tag?
  1. Name
  2. Size
  3. Multiple
  4. All of the above
Answers is:     All of the above 

Question: 53
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?
  1. <textarea rows="8" cols="20"> Your Comments.... </textarea>
  2. <textarea row="8" col="20"> Your Comments.... </textarea>
  3. <textarea rowcount="8" colcount="20"> Your Comments.... </textarea>
  4. <input type="text" maxlength="100"/>
Answers is:      <input type="text" maxlength="100"/>

Question: 54
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 forformatting the various <td> table cells?
  1. External style sheet
  2. Inline style
  3. Internal style sheet
  4. Browser default
  5. External style sheet
Answers is:      External style sheet

Question: 55
Which of the following is/are not correct for a <meta> tag in HTML 4.01?
  1. It is more useful if it is placed in a head element.
  2. It can be used to specify the keywords for the searchengines.
  3. It can be used to redirect users to other URLs.
  4. It is mandatory to specify its name or scheme attributes.
Answers is:      It is mandatory to specify its name or scheme attributes.

Question: 56
Which of the following statements is correct for the tag?
  1. The text under block quote must be enclosed in a block level element in a strict DTD document.
  2. The attribute named cite must be specified.
  3. Closing the tag is optional.
  4. It places an empty line after the text.
Answers is:    It places an empty line after the text.

Question: 57
Which of the following is/are not true for a paragraph tag in HTML 4.01?
  1. The text must be enclosed in <p> and </p> tags.
  2. It creates an empty line above its starting line.
  3. It cannot be used within a <td> tag.
  4. It creates an empty line after its ending line.
Answers is:     b and c

Question: 58
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?
  1. Td
  2. P
  3. Ls
  4. Pre
Answers is:     Pre

Question: 59
What do you infer from the following code? <a href = "http://www.expertrating.com"> Expert Rating
  1. This href is using absolute pat for linking.
  2. This href is an example of relative path linking.
Answers is:     This href is using absolute path for linking.

Question: 60
Which of the following values is/are valid for the align attribute of a tag?
  1. Left
  2. Right 
  3. Center
  4. Offset
Answers is:     a, b and c 


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


0 comments:

Post a Comment

Popular Posts