HTML 4.01 Test


1) 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">

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

3) 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

4) 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.

5) Which tag is meant for creating inline frames that display other HTML pages?

a)  img
b)  frame
c)  iframe
d)  url

6) 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.

7)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?

a)  An HTML page with three columns of equal width.
b)  An HTML page with three rows of equal height.
c)  An HTML page with the last column occupying 60% space.
d)  An HTML page with the last column occupying 40% space.

8) 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

9) 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>
d)  <a href="mailto://webmaster@xcompany.com">webmaster</a>

10) 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... -!>

11) 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"


12) 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>

13) 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.

14) 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.

15) 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.


16)  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

17) 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.
 
18) 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

19) 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

20) 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.
 
21) The tag which is used to show monospaced text is:

a)  <td>
b)  <th>
c)  <tt>
d)  <b>

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

23) 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">

24) 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">

25) 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>

26) 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.
 
27) 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.

28) 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

29) Which event is fired when an element loses its focus on a form?

a) onfocus
b) onload
c) onblur
d) onselect

30) Which of the following tags can be used in place of a button tag?

a)  legend
b) ol
c) input
d) dl

31) 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.

32) 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>
 
33) Which of the following tags would assist in creating named groups within a select list?

a) opt
b) group
c) optgroup
d) selectgroup

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

35) Which of the following is not an attribute of a meta tag?

a)  name
b)  content
c)  http-equiv
d) type
 
36) 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

37) 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>


38) 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

39) 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" />

Comments