Tuesday, April 8, 2014

Elance HTML 4.01 Test


8.   Which of the following attributes are Related to the<img> tag?
Height, alt src

#31 Question:
You have the following directory structure.

webroot->products->ordered->delivered

The products directory has a page called Products.html and the delivered directory has a page called Delivered.html. You want to provide a link to the Products page on Delivered.html. The ideal code should
be:
    a. <a href="././Products.html"> All Products </a>
    b. <a href="../../Products.html"> All Products </a>
    c. <a href=".../.../Products.html"> All Products </a>
    d. <a href="../Products.html"> All Products </a>
    e. <a href="Products.html"> All Products</a>

#32 Question:
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 of the above are correct.
    d. The height and width attributes allow resizing the image on the webpage.

#33 Question:
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.

#34 Question:
The tag which is used to show monospaced text is:
    a. <td>
    b. <th>
    c. <tt>
    d. <b>

#35 Question:
What is the character-entity representation of the "less than" sign (<)?
    a. 60;#
    b. &#60;
    c. &60#;
    d. #60&;

#36 Question:
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.

#37 Question:
A computer programming book has to go online. Which of the following tags is ideal for displaying the program snippets?
    a. <emp>
    b. <code>
    c. <dfn>
    d. <cite>

#38 Question:
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.

#39 Question:
What would you infer from the following code in an HTML 4.01 Web site?

<body topmargin=2 leftmargin=2>
·                     a. The top margin and left margin of the webpage is 2 pixels.
·                     b. The bottom margin and right margin of the web page is 2 pixels.
·                     c. Both of the above.
·                     d. None of the above. The topmargin and leftmargin attributes are not valid HTML 4.01 body attributes.

#40 Question:
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.

#41 Question:
Which attribute specifies the submit URL in a form tag?
·                     a. method
·                     b. action
·                     c. name
·                     d. id

#42 Question:
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.
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

#43 Question:
Which of the following tags within a table can be used to set the properties of one column or a group of columns?
·                     a. colgroup
·                     b. col
·                     c. cols
·                     d. tab

#44 Question:
Which of the following is incorrect with regard to the <select> tag?
Which of the following options about the <select> tag is incorrect?
·                     a. The name attribute 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 attribute is displayed in the drop-down list.

#45 Question:
A few lines in an HTML paragraph are to be formatted differently from the rest of the lines. Which tag will assist in this?
·                     a. div
·                     b. p
·                     c. span
·                     d. format

#46 Question:
Which of the following font styling tag is not valid?
    a. <small>
    b. <i>
    c. <b>
    d. <big>
    e. <large>

#47 Question:
Which of the following tags can be used in place of a button tag?
·                     a. legend
·                     b. ol
·                     c. input
·                     d. dl

#48 Question:
Which of the following statements is/are correct for DTDs?
·                     a. A strict DTD allows users to use cascading style sheets.
·                     b. A transitional DTD displays content in those browsers that don't support CSS.
·                      c.) A frameset DTD is used to partition the browser window.
d. All of the above

#49 Question:
Choose the incorrect statement:

    a. The <em> tag emphasizes the given text by italicizing it.
    b. The <code> tag indicates that the text inside is an example of typed code.
    c. The <var> tag indicates that the text inside the tag has been revised.
    d. The <strong> tag is for strongly emphasizing the text.

#50 Question:
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 for formatting the various <td> table cells?

    a. External style sheet
    b. Inline style
    c. Internal style sheet
    d. Browser default

#51 Question:
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.

#52 Question:
Which event is fired when an element loses its focus on a form?
    a. onfocus
    b. onload
    c. onblur
    d. onselect

#53 Question:
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.

#54 Question:
Which of the following attributes is/are related to the <img> tag?
    a. height
    b. alt
    c. src
    d. All of the above

#55 Question:
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 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.

#56 Question:
Which tag is meant for creating inline frames that display other HTML pages?
    a. img
    b. frame
    c. iframe
    d. url

#57 Question:
Which of the following attributes is/are not associated with textarea tag in W3C standard HTML 4.01?
    a. wrap New in HTML5.
    b. cols
    c. name
    d. rows
    e. ref

58 Question:
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

#59 Question:
What is meant by the cellspacing attribute?
    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.

#60 Question:
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>

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

#62 Question:
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

#63 Question:
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>

#64 Question:
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" />
    </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" />

#65 Question:
Which of the following items should not be used in the address tag?
    a. physical contact address of the Web site
    b. contact email address for the Web site
    c. contact signature
    d. abbreviations
a. physical contact address of the Web site
c. contact signature     (5
d. abbreviations    (2

#66 Question:
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 tag to include that cell to the group.

#67 Question:
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

#69 Question:
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>

#70 Question:
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

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

72 Question:
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.
    c. It specifies the space between two cells.
    d. It makes the cell span more than one row.

#73 Question:
Which of the following tags would assist in creating named groups within a select list?
    a. opt
    b. group
    c. optgroup
    d. selectgroup

#74 Question:
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.

#75 Question:
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>

#76 Question:
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?
    a. td
    b. p
    c. ls
    d. pre

#77 Question:
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">

#78 Question:
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 Title</h7>

#79 Question:
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.

#80 Question:
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">

#83 Question:
Which of the following shows the basic tag structure of an HTML document?
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>

#84 Question:
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">

#87 Question:
Which of the following is/are not true for a paragraph tag in HTML 4.01?
    a. The text must be enclosed in <p> and </p> tags.
    b. It creates an empty line above its starting line.
    c. It cannot be used within a <td> tag.
    d. It creates an empty line after its ending line.
if  multiple choise
Browsers automatically add some space (margin) before and after each <p> element.
#89 Question:
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>

#94 Question:
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">

#95 Question:
For allowing the user to select only one radio button from a group of radio buttons:
    a. The name of an input tag must be same for all the radio buttons.
    b. The value of an input tag must be same for all the radio buttons.
    c. The display text of an input tag must be same for all the radio buttons.
    d. All the radio buttons must be added to same group using <group> tag.

#97 Question:
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" />

#98 Question:
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>

#104 Question:
Which of the following statements is true about the table header, body, and footer tags?
    a. The table's header, body, and footer tags are <tablehead>, <tablebody>, and <tablefoot>, respectively.
    b. The table's 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 tags.
    d. These tags are supported by a wide range of browsers and are commonly used by Web designers.

#107 Question:
Which of the following attributes is/are valid  for a select tag contained within a form tag?
    a. name
    b. size
    c. multiple
    d. All of the above

#108 Question:
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... -!>

#109 Question:
Which of the following is not correct for a div tag?
    a. It defines a logical division or section of an HTML document.
    b. It usually leaves empty space before and after the tag.
    c. We cannot apply style to a div tag.
    d. None of the above.

http://hlam.com.ua/expertrating/question.php?id=17063
- -  - - - -  - - - -
http://seolearning9.blogspot.in/2012/05/odesk-html-test-401.html
Question no. 6
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 no. 9
Which of the following values is/are valid for the align attribute of a tag?
a.left
b.right
c.center
d. offset

Question no. 18
Which of the following values for the scrolling attribute for the frame tag is not valid?
a. yes
b. default
c. auto
d. no
auto Scrollbars appear if needed (this is default) yes Scrollbars are always shown (even if they are not needed) no Scrollbars are never shown (even if they are needed)

Question no. 19
Which of the following is/are not correct for a <meta> tag in HTML 4.01?
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 its name or scheme attributes.

Question no. 20
The tag that is used to pass the parameters to an applet is:
a. appletpar
b. applet
c. param
d. val

Question no. 22
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?
a. 89
b. 90
c. Item 1
d. Item 2

Question no. 23
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
e. There is no way to do this

Question no. 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 no. 28
Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column?
a. col
b. colgroup
c. rowspan
d. row

Question no. 37
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?
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.

Designing the links page D

Which attribute(s) of the <table tag is/are deprecated in html 4.0.1?   X
Bgcolor & align.

Which of the following is invalid value for the shape attribute of an area tag?
tri

It will open the site msdn.com in a new window  B

#statemap A

<!doctype  A

Which of the following is not a valid input type of the form tag?
Checkbox, image, hidden, button, All are valid

Which of the following values is/are valid for the Valign attribute of a <tr> tag?
valign="top|middle|bottom|baseline"

Go online B

A Piece of text contains  D

Comes in handy B

Correct for a <meta>  D

Font styling tag Large

Submit url  B

Scrolling attribute  B
Question:6
How will you specify the language attribute in XHTML?
a.     <div lang=”en” xml:lang=”en”>Listing A</div>
b.     <div language=”en”>Listing A</div>
c.     <div language=”en” xhtml:lang=”en”>Listing A</div>
d.     <div xml:language=”en”>Listing A</div>
Question: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<P>
c.     Here is a break statement <br></br>
d.     New Horizontal line <hr />
Question: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>
Question:14
Which of these tags will create a single space character?
a.     <td>
b.     <th>
c.     &nbsp; 
d.     <b>
Question:17
Which attributes of the <table> tag is deprecated in HTML 4.01 and not supported in strict DTD XHTML?
a.     Align
b.     bgcolor
c.     cellspacing
Question: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
Question: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
Question:45
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”
Question:46
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?
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
Question:47
Take a look at the following code:
<html>
<head>
<title>HTML AND XHML</title>
<body>
<h1>Defining HTML
</body>
What will happen when you run this code in the browser?
a.     With a .html extension, the page will be displayed with errors
b.     With a .html extension, the page will not be displayed at all
c.     With a .xhtml extension, the page will be displayed with errors
d.     With a .xhtml extension, the page will not be displayed at all
Question:52
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 <html> tag
d.     Its declaration is not a part of the XHTML document itself
e.     None of the above
Question:57
While writing a strict DTD XHTML document, you want to create a table having 2 columns, both left aligned. What technique
will you choose to do this?
a.     <table align=”left” border=”1?>
<tr><td>Plan A </td>
<td align=”left”>Monthly payment of $60</td>
</tr>
. . .
. . .
</table>
b.     <table border=”1?>
<tr><td align=”left”>Plan A</td>
<td align=”left”>Monthly payment of $60</td>
</tr>
. . .
. . .
</table>
c.     <table align=”left” border=”1?>
<tr><td align=”left”>Plan A</td>
<td align=”left”>Monthly payment of $60</td>
</tr>
. . .
. . .
</table>
d.     <table border=”1?>
<tr><td align=”left”>Plan A</td>
<td>Monthly payment of $60</td>
</tr>
. . .
. . .
</table>
http://www.vjseomarketing.com/blog/html4-odesk-test-question-answer/

which of the following is not an attribute of a meta tag?
a. name
b. content
c. http-equiv
d. type


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="x1,y1,x2,y2,..,xn,yn"
b. coords="x,y,radius"
c. coords="x1,y1,x2,y2"

- - - - - - -  - - - - - - - - - - - -
HTML 5



Which of the following statements is correct if you allow the user to select only one radio button from a group of radio buttons?
a. The name of the input tag must be the same for all the radio buttons.
b. The value of the input tag must be the same for all the radio buttons.
c. The display text of the input tag must be the same for all the radio buttons.
d. All the radio buttons must be added to the same group using the &lt;optgroup&gt; tag.

When is the window onstorage event triggered in the HTML document?
a. It is triggered when the window is resized.
b. It is triggered when a Web Storage area is updated.
c. It is triggered when a document performs an undo function.
d. It is triggered when the window becomes visible.

This question is based upon the figure shown below:
The name property of "Element"node shown in figure will return ____
a. tag name
b. name of node
c. name of element
d. value of element

Suppose you want to display certain text , for example, "First Program !"in red color and times new roman font family on the screen. Which of the following is the correct syntax to do so?
a.
<!DOCTYPE HTML>
<html><body>
     <p id="p1">First program!</p>
     <script>
        document.getElementById("p1").style.color = "red";
        document.getElementById("p1").style.fontFamily = "Times new roman";
     </script>
</body></html>
b.
<!DOCTYPE HTML>
<html><body>
    <p id="p1">First program!</p>
    <script>
        document.getElementById("p1").style.color="red" && style.fontFamily="Times new roman";
    </script>
</body></html>
c.
<!DOCTYPE HTML>
<html><body>
    <p id="p1">First program!</p>
    <script>
        document.getElementById("p1")color="red" && fontFamily="Times new roman";
    </script>
</body></html>
d. None of the above

Which of the following represents INVALID syntax for defining an attribute value in an HTML 5.0 document?
a.     <input name='be evil' />
b.     <input name=be evil />
c.     <input name="be-evil" />
d.     All of the above.

Suppose there are three lines of text to be displayed. These lines are as follows:
"First Line",
"Second Line"
"New line"
If you want "New Line"to be displayed in between the other two lines, then which of the following is the correct syntax to do so?
a.     <html>
  <body>
    <script>
      var newText=document.createElement("anew");
      var node=document.createTextNode("New Line.");
      newText.appendChild(node);

      var element=document.getElementById("Firstdiv");
      var newchild=document.getElementById("a2");
      element.insertBefore(newText,newchild);
    </script>
    <div id="Firstdiv">
      <p id="a1">First Line.</p>
      <p id="a2">Second Line.</p>
    </div>
  </body>
</html>

b.     <html>
  <body>
    <div id="Firstdiv">
      <p id="a1">First Line.</p>
      <p id="a2">Second Line.</p>
    </div>
    <script>
      var newText=document.createElement("anew");
      var node=document.createTextNode("New Line.");
      newText.appendChild(node);

      var element=document.getElementById("Firstdiv");
      var newchild=document.getElementById("a2");
      element.insertBefore(newText,newchild);
    </script>
  </body>
</html>

c.     <html>
  <body>
    <div id="Firstdiv">
      <p id="a1">First Line.</p>
      <p id="a2">Second Line.</p>
    </div>
    <script>
      var newText=document.createElement("anew");
      var node=document.createTextNode("New Line.");
      newText.appendChild(node);

      var element=document.getElementById("Firstdiv");
      element.appendChild(newText);
    </script>
  </body>
</html>

Which of the following is a valid attribute for the <colgroup> element in an HTML 5.0 document?
a.     char (HTML 4.01
b.     span (HTML 5.0
c.     align (HTML 4.01
d.     width (HTML 4.01
align left right center justify char Not supported in HTML5. Aligns the content in a column group char character Not supported in HTML5. Aligns the content in a column group to a character charoff number Not supported in HTML5. Sets the number of characters the content will be aligned from the character specified by the char attribute span number Specifies the number of columns a column group should span valign top middle bottom baseline Not supported in HTML5. Vertical aligns the content in a column group width pixels % relative_length Not supported in HTML5. Specifies the width of a column group

What will be the output of the following HTML DOM code?

<!DOCTYPE html>
<html><body>
    <p id="begins">First Attempt! </p>
    <script>
      var txt=document.getElementById("begins").innerHTML;
    </script>
</body></html>

a.     First Attempt!
b.     First Attempt!
       First Attempt!
c.     First Attempt!
       null
d.     First Attempt!
       begins
e.     blank, nothing will appear on screen

In HTML 5.0, which of the following attributes of the <object> element refers to the location of the object's data?
a. type
b. codebase
c. data
d. usemap

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

In HTML 5.0, how will the script be executed if you use the script element shown below?

<script src="script.js" type="text/javascript" defer="defer"></script>
a. The script is fetched and executed immediately, before the user agent continues     
   parsing the page.
b. The script will be executed when the page has finished parsing.
c. The script will be executed asynchronously, as soon as it is available.

Which of the following is the correct syntax to define a charset in the HTML 5 <meta> element?
a.     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
b.     <meta charset="ISO-8859-1">
c.     Neither a nor b.
HTML 4.01: <meta http-equiv="content-type" content="text/html; charset=UTF-8">
HTML5: <meta charset="UTF-8">

 This question is based upon the figure shown below:
Consider the above code. What will be the impact upon the contents of the element if both the style sheets define the same class?
a.     The contents of the element will be of red color and will inherit all the effects of style.css.
b.     The contents of the element will be of blue color and will inherit all the effects of style1.css.
c.     The contents of the element will be of white color and will inherit all the effects of style.css and style1.css.
d.     None of the style effects will be applied to the contents of the element.

Which of the following is true about HTML DOM?

i) It is a standard object model for HTML.
ii) It is a programming language.
iii) It is a standard programming interface for HTML.
a.     i & ii
b.     i & iii
c.     ii & iii
d.     All of the above
e.     None of the above

Which of the following is an obsolete attribute of the <ol> element in HTML 5.0?
a.     type
b.     reversed
c.     start
d.     compact

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.

How will you return a reference to the parent of the current window or subframe in an HTML 5.0 web application?
a.     window.top
b.     window.parent
c.     window.frameElement
d.     None of the above

Which of the following is NOT an attribute of the <meta> element in HTML 5.0?
a.     charset
b.     content
c.     http-equiv
d.     scheme

You are writing the code for an HTML form and you want the browser to retain the form's input values. That is, if a user submits the form and presses the browser's back button, the fully populated form is displayed instead of a blank form. Which of the following HTML 5.0 attributes will you use?
a.     accept
b.     autofocus
c.     autocomplete
d.     formtarget

What is the function of onobsolete, an application cache API method in HTML 5.0?
a.     It reflows the HTML document using updated cached content.
b.     It triggers an event when the cache content has been marked as obsolete.
c.     It triggers an event when the cache content has been updated.
d.     It updates the cache for the current document in the background.

In HTML 5.0, which of the following is NOT a valid value for the type attribute when used with the <command> tag shown below?

<command type="?">Click Me!</command>
a.     button
b.     command
c.     checkbox
d.     radio

This question is based upon the figure shown below:
Suppose you add the input code given above to your HTML web page. What result will be returned by the JavaScript function when you click the button marked as A in the image?
a.     number
b.     text
c.     button
d.     None of the above

Which HTML 5.0 element will you use to group the related options in a drop-down list?
a.     optgroup
b.     option
c.     menu
d.     var
e.     nav

What is the output when you use the HTML 5.0 code snippet shown below?

<body onload="alert(this)">
a.     It will alert saying "[object HTMLBodyElement]" when the document is loaded.
b.     It will alert saying "[object Window]" when the document is loaded.
c.     It will alert saying "[this]" when the document is loaded.
d.     The alert message is not properly defined in the body element and an error will be generated when the document is loaded.

In HTML 5.0, what is the function of the sandbox attribute when used with <iframe> as shown below?
<iframe src="aaa " sandbox=?></iframe>
a.     It is used to define the restrictions to the frame content.
b.     It is used to define the URL of the document that should appear in the iframe.
c.     It is used to specify that an iframe should appear as if it is part of the document the iframe is in.

Which of the following <link> attributes are NOT supported in HTML 5.0?
a.     sizes
b.     rev
c.     rel
d.     charset

Which of the following is NOT a valid value for the <iframe> sandbox attribute in HTML 5.0?
a.     url
b.     allow-scripts
c.     allow-same-origin
d.     allow-forms

A computer programming book has to go online. Which of the following tags is ideal for displaying the program snippets?
a.     <emp>
b.     <code>
c.     <dfn>
d.     <cite>

Which of the following is the correct method to change the background color to indigo with help of a button?
a.     <!DOCTYPE html>
<html>
  <body>
    <script>
      function ChangeBackground()
      {
      document.backgroundColor="Indigo";
      }
    </script>
    <input type="button" value="New Color" onclick="ChangeBackground()"/>
  </body>
</html>

b.     <!DOCTYPE html>
<html>
  <body>
    <input type="button" value="New Color" onclick="ChangeBackground()"/>
    <script>
      function ChangeBackground()
      {
      document.body.style.backgroundColor="Indigo";
      }
    </script>
  </body>
</html>

c.     <!DOCTYPE html>
<html>
  <body>
    <script>
      function ChangeBackground()
      {
      document.new.backgroundColor="Indigo";
      }
    </script>
    <input type="button" value="New Color" onclick="ChangeBackground()"/>
  </body>
</html>
d.     None of the above

For adding a new child node before a specified child node, which of the following methods is used?
a.     insertBefore()
b.     replaceChild()
c.     appendChild()

Which of the following are valid mouse events in HTML 5.0?
a.     ondblclick
b.     ondragstart
c.     ondragenter
d.     onscroll
e.     ondrop

What is the default background color for the canvas element in HTML 5.0?
a.     Black
b.     White
c.     Transparent
d.     Gray

Which of the following is an INVALID value for the type attribute of command tag?
a.     checkbox
b.     radio
c.     command
d.     text