Question:* Which of the following is incorrect with regard to the <select> tag?
Answer: • The text specified in the "value" is displayed in the drop-down list
Question:* You have defined the following image in an XHTML document:
<img src="/image/logo.gif" alt="" id="img1" />
Answer: • The code will work properly in a browser that supports both HTML 4.x and XHTML
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 is "webmaster@xcompany.com"?
Answer: • <a href="mailto:webmaster@xcompany.com">webmaster</a>
Question:* What do you understand by cellspacing?
Answer: • It specifies the space between two cells
Question:* Which of the following lines will be allowed by an XHTML parser?
Answer: • New Horizontal line <hr />
Question:* What do you understand by the following line of code?
<html xmlns="http://www.w3.org/TR/REC-xml-names">
Answer: • xmlns specifies the URL to qualify the names used in the XHTML document
Question:* Which of the following statements is true about the table header, body and footer tags?
Answer: • None of the above
Question:* Which of the following is not correct for a <meta> tag?
Answer: • It is more useful if it is placed in a head element
Question:* Your browser supports bidirectional text. Which tag will you use if you need to display text from right to left?
Answer: • <bdo dir="rtl">Text should go in opposite direction</bdo>
Question:* How will you import a style sheet named "basic.css" in your web page?
Answer: • <link rel="stylesheet" type="text/css" href="basic.css"/>
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?
Answer: • <tr><th>Customer Name</th>
<th colspan="3">Contact</th>
</tr>
Question:* 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?
Answer: • The readonly attribute in line 5 is not correctly coded
Question:* How will you specify a comment in an XHTML document?
Answer: • <!-- Here is a comment.. -->
Question:* Which of the following statements is correct with regard to DTDs?
Answer: • A frameset DTD is used to partition the browser window
Question:* Which attributes of the <table> tag is deprecated in HTML 4.01 and not supported in strict DTD XHTML?
Answer: • bgcolor
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?
Answer: • <textarea rows="8" cols="20"> Your comments ....</textarea>
Question:* What is the numeric entity representation of the 'less than' sign (its entity name is '<') ?
Answer: • <
Question:* Which of the following is incorrect about the relation between HTML and XHTML?
Answer: • XHTML and HTML both are used to generate dynamic content
Question:* While designing the links page of your website, you want the link to open in a new window. How will you implement this with XHTML using Transitional doc type?
Answer: • <a href="http://www.mailer.com" target="_blank">Mailer</a>
Question:* 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?
Answer: • <fieldset>
Question:* Which attribute specifies the submit URL in a form?
Answer: • action
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="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?
Answer: • It will allow the user to choose only one option out of the four
Question:* What do you understand by cellpadding?
Answer: • It specifies the space between the cell wall and the contents of the cell
Question:* Which of the following is correct for an image?
Answer: • The height and width attributes allow resizing the image on the webpage
Question:* On one of your web pages named "Listing.xhtml" you specified a target like this:
<a name="target4">Old Listing</a>
How will you make a link to the above target?
Answer: • <a href="#target4">Check Old Listing as well</a>
Question:* Which of the following statements is correct for the <blockquote> tag?
Answer: • The text under blockquote must be enclosed in a block level element in a strict DTD document
Question:* A developer wrote this image tag:
<img src ="states.gif" width ="330" height ="406" alt="States"
usemap ="#statemap" />
What code should follow this?
Answer: • <map id="statemap" name="statemap">
<area shape="rect" coords="0,0,82,126" href="state1.htm" alt="State1" />
</map>
Question:* A <doctype> defines the document type of any XHTML document. It can be of three types:
Answer: • Strict, Transitional, and Frameset
Question:* 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?
Answer: • optgroup
Question:* Which of the following is correct regarding the frame attribute of the table tag?
Answer: • A "hsides" frame attribute will show the border lines for horizontal sides of the table only
Question:* Which of these tags will create a single space character?
Answer: •
Question:* 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?
Answer: • <table border="1">
<tr><td align="left">Plan A</td>
<td align="left">Monthly payment of $60</td>
</tr>
. . .
. . .
</table>
Question:* Which of the following is correct about the <!DOCTYPE ...> tag?
Answer: • None of the above
Question:* You specified a base tag and anchors as follows:
1. <base target="_blank"></base>
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?
Answer: • Only the Yahoo link will open in a new window
Question:* 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:
Answer: • img, map, frame and applet tags
Question:* Which of the following is true for the "<param>" tag?
Answer: • It doesn't need a closing tag
Question:* Within a table cell "<td>":
Answer: • All the above tags can be used
Question:* Which of the following represents the basic tag structure of an XHTML document?
Answer: • <html><head></head><body></body></html>
Question:* Your website has moved to some other address. How will you automatically redirect a user to that address within 3 seconds of landing on the old address?
Answer: • <meta http-equiv="refresh" content="3; url=http://www.newurl.com"/>
Question:* How will you specify the language attribute in XHTML?
Answer: • <div lang="en" xml:lang="en">Listing A</div>
No comments:
Post a Comment