MCQs > IT & Programming > XHTML MCQs > Basic XHTML MCQs

Basic XHTML MCQ

1. To embed a flash player, you use the ____ parameter to identify the video file to be played.

Answer

Correct Answer: Movie

Note: This Question is unanswered, help us to find answer for this one

2. ________ members of a base class are never accessible to a derived class.

Answer

Correct Answer: Private

Note: This Question is unanswered, help us to find answer for this one

3. Extending the first line of text to the left of the text block creates a ____ indent.

Answer

Correct Answer: Hanging

Note: This Question is unanswered, help us to find answer for this one

4. You can create web pages using a(n) ____, such as adobe dreamweaver or amaya.

Answer

Correct Answer: WYSIWYG editor

Note: This Question is unanswered, help us to find answer for this one

5. The ____ style can be used to change label elements into block elements.

Answer

Correct Answer: Display: block

Note: This Question is unanswered, help us to find answer for this one

6.

How will you import a style sheet named "basic.css" in your web page?

 

Answer

Correct Answer: <link rel="stylesheet" type="text/css" href="basic.css"/>

Note: This Question is unanswered, help us to find answer for this one

7.

Which of the following represents the basic tag structure of an XHTML document?

 

Answer

Correct Answer: <html><head></head><body></body></html>

Note: This Question is unanswered, help us to find answer for this one

8.

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

Correct Answer: href="#target4">Check Old Listing as well

Note: This Question is unanswered, help us to find answer for this one

9.

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

Correct Answer: textarea rows="8" cols="20"> Your comments .... /textarea>

Note: This Question is unanswered, help us to find answer for this one

10.

How will you specify a comment in an XHTML document?

 

Answer

Correct Answer: <!-- Here is a comment.. -->

Note: This Question is unanswered, help us to find answer for this one

11.

Your browser supports bidirectional text. Which tag will you use if you need to display text from right to left?

Answer

Correct Answer: <bdo dir="rtl">Text should go in opposite direction</bdo>

Note: This Question is unanswered, help us to find answer for this one

12.

Which of the following is correct for an image?

Answer

Correct Answer: The height and width attributes allow resizing the image on the webpage

Note: This Question is unanswered, help us to find answer for this one

13.

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

Correct Answer: <fieldset>

Note: This Question is unanswered, help us to find answer for this one

14.

How will you specify the language attribute in XHTML?

 

Answer

Correct Answer:  lang="en" xml:lang="en">Listing A 

Note: This Question is unanswered, help us to find answer for this one

15.

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

Correct Answer: <table border="1"> <tr><td align="left">Plan A</td> <td align="left">Monthly payment of $60</td> </tr> . . . . . . </table>

Note: This Question is unanswered, help us to find answer for this one

16.

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

Correct Answer: meta http-equiv="refresh" content="3; url=http://www.newurl.com"/>

Note: This Question is unanswered, help us to find answer for this one

17.

Within a table cell "<td>":

 

Answer

Correct Answer: All the above tags can be used

Note: This Question is unanswered, help us to find answer for this one

18.

The following registration form was coded by a pro…

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

Correct Answer: The readonly attribute in line 5 is not correctly coded
The syntax of the select tag is not correct

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

19.

What is the numeric entity representation of the '…

Answer

Correct Answer: #60;

Note: This Question is unanswered, help us to find answer for this one

20.

Which of the following statements is true about the table header, body and footer tags?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

21.

What do you understand by cellspacing?

Answer

Correct Answer: It specifies the space between two cells

Note: This Question is unanswered, help us to find answer for this one

22.

A <doctype> defines the document type of any XHTML document. It can be of three types:

Answer

Correct Answer: Strict, Transitional, and Frameset

Note: This Question is unanswered, help us to find answer for this one

23.

Which of the following is correct about the <!DOCTYPE ...> tag?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

24.

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

Correct Answer: img, map, frame and applet tags

Note: This Question is unanswered, help us to find answer for this one

25.

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

Correct Answer: optgroup

Note: This Question is unanswered, help us to find answer for this one

26.

You have defined the following image in an XHTML document:
<img src="/image/logo.gif" alt="" id="img1" />

Answer

Correct Answer: The code will work properly in a browser that supports both HTML 4.x and XHTML

Note: This Question is unanswered, help us to find answer for this one

27.

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

Correct Answer: Only the Yahoo link will open in a new window

Note: This Question is unanswered, help us to find answer for this one

28.

Which of the following is incorrect about the relation between HTML and XHTML?

Answer

Correct Answer: XHTML and HTML both are used to generate dynamic content

Note: This Question is unanswered, help us to find answer for this one

29.

Which of the following is not correct for a <meta> tag?

Answer

Correct Answer: It is mandatory to specify the name or scheme attributes

Note: This Question is unanswered, help us to find answer for this one

30.

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

Correct Answer: <a href="http://www.mailer.com" target="_blank">Mailer</a>

Note: This Question is unanswered, help us to find answer for this one

31.

Which of the following is correct regarding the frame attribute of the table tag?

Answer

Correct Answer: A "hsides" frame attribute will show the border lines for horizontal sides of the table only

Note: This Question is unanswered, help us to find answer for this one

32.

Which attributes of the <table> tag is deprecated in HTML 4.01 and not supported
in strict DTD XHTML?

Answer

Correct Answer: align

Note: This Question is unanswered, help us to find answer for this one

33.

Which of the following statements is correct with regard to DTDs?

Answer

Correct Answer: All of the above [confirmed]

Note: This Question is unanswered, help us to find answer for this one

34.

Which attribute specifies the submit URL in a form?

Answer

Correct Answer: action

Note: This Question is unanswered, help us to find answer for this one

35.

What do you understand by the following line of code?
<html xmlns="http://www.w3.org/TR/REC-xml-names">

Answer

Correct Answer: xmlns specifies the URL to qualify the names used in the XHTML document

Note: This Question is unanswered, help us to find answer for this one

36.

Which of these tags will create a single space character?

Answer

Correct Answer: <&>

Note: This Question is unanswered, help us to find answer for this one

37.

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

Correct Answer: It will allow the user to choose only one option out of the four

Note: This Question is unanswered, help us to find answer for this one

38.

What do you understand by cellpadding?

Answer

Correct Answer: It specifies the space between the cell wall and the contents of the cell

Note: This Question is unanswered, help us to find answer for this one

39. Which of the following statements is correct for the <blockquote> tag?


Answer

Correct Answer: The attribute named "cite" must be specified

Note: This Question is unanswered, help us to find answer for this one

40. Which of the following is true for the "<param>" tag?


Answer

Correct Answer: The language attribute cannot be specified with it

Note: This Question is unanswered, help us to find answer for this one

41. Which of the following is incorrect with regard to the <select> tag?


Answer

Correct Answer: The "multiple" attribute allows the user to choose multiple options

Note: This Question is unanswered, help us to find answer for this one

42. Which of the following lines will be allowed by an XHTML parser?


Answer

Correct Answer: <P>This is the starting of a new paragraph<P> 

Note: This Question is unanswered, help us to find answer for this one

43. What is the correct formatting of a horizontal rule?

Answer

Correct Answer:

Note: This Question is unanswered, help us to find answer for this one

44. Which is a complete list of XHTML versions?

Answer

Correct Answer: 1.0, 1.1, 5

Note: This Question is unanswered, help us to find answer for this one

45. What is the primary difference between XHTML 1.0 and XHTML 1.1?

Answer

Correct Answer: XHTML 1.1 includes Ruby annotations

Note: This Question is unanswered, help us to find answer for this one

46. What are the character encodings that are guaranteed to work properly for an XHTML document?

Answer

Correct Answer: UTF-8 and UTF-16

Note: This Question is unanswered, help us to find answer for this one

47. Which of the following character entities cannot be used in XHTML?

Answer

Correct Answer:  

Note: This Question is unanswered, help us to find answer for this one

48. What is wrong with this doctype declaration?

Answer

Correct Answer: The doctype declaration has no closing tag.

Note: This Question is unanswered, help us to find answer for this one

49. What happens if you put an XHTML element in HTML?