2015-12-14

In this post you can find Complete and recently updated Correct Question and answers of XHTML. All Answers updated regularly with new questions. Upwork XHTML test answers of 2016.

Python

PHP

CSS

android

html5

SEO

Javascript

Adobe Photoshop

Wordpress

Perl

Joomla

Twitter Bootstrap

EX4

Magento

Ruby on Rails

jQuery

Drupal

C Programming

C++

C#

SQL

Node.js

Django

CCNA

Question:* Which of these is well formed?

Answer: • <body>

Question:* What's the most common XHTML DTD?

Answer: • Transitional

Question:* Which of these frame references is a well formed 2 column frame?

Answer: • <frameset cols="50%,50%"> <frame src="frame-1.html"> <frame src="frame-2.html"> </frameset>

Question:* When referencing an image map, what attribute is assigned to the image?

Answer: • ismap

Question:* Which of the following is something you can do in XHTML that you can't do in HTML?

Answer: • Include processing instructions

Question:* Which of these are the correct structure of a definition list?

Answer: • <dl> <dt>Car</dt> <dd>Convertible</dd> </dl>

Question:* What would you put inside of a <![CDATA[ .... ]]> element?

Answer: • Text that contains characters that would otherwise need to be escaped.

Question:* Which is the correct method of defining the default option that's in the select group?

Answer: • <select name="list" id="list"> <option value="1" >One</option> <option value="2">Two</option> <option value="3" selected="selected">three</option> </s

Question:* Which of the following is the correct document structure?

Answer: • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title</title> </head>

Question:* What is the correct usage of the label element?

Answer: • <form method="post" action="action.php"> <label for="name">Name</label> <input type="text" name="name" id="name" /> </form>

Question:* What tag is used to define italics besides <i>?

Answer: • <em>

Question:* What is the correct formatting for including JavaScript?

Answer: • <script type="text/javascript"></script>

Question:* Which of these is an inline element by default?

Answer: • span

Question:* Which is the correct method of including an inline style?

Answer: • <div class="good-morning"><h1 style="margin: 0; padding: 0;">Good morning!</h1></div>

Question:* To set parameters within the object tag, you would use which tag?

Answer: • <param>

Question:* What does XSLT stand for?

Answer: • Extensible Stylesheet Language Transformations

Question:* What is the correct value for opening a link in a new window?

Answer: • target="_new"

Question:* How is the default namespace usually included on an XHTML document?

Answer: • <html xmlns="http://www.w3.org/1999/xhtml">

Question:* Which of the following elements cannot go in the <head> tag

Answer: • <header>

Question:* What tag is used to store the description of the document?

Answer: • <meta>

Question:* Which of the following is the correct way to start a new line in XHTML?

Answer: • <br />

Question:* The correct tag for defining a table header cell is:

Answer: • <th>

Question:* What XHTML DTD is used most often?

Answer: • Transitional

Question:* Which is NOT an acceptable XHTML DOCTYPE?

Answer: • <!DOCTYPE html>

Question:* Which type attribute minimization is allowed in XHTML?

Answer: • Attibute minimization is not allowed in XHTML

Question:* What does DTD stand for?

Answer: • document type declaration

Question:* Which of these is a correct application of a class?

Answer: • <span class="class">span</span>

Question:* How many levels of the heading tag (<h1>,<h2>, etc.) are allowed in XHTML?

Answer: • 6

Question:* In XHTML the correct method of defining a meta tag is:

Answer: • <meta name="description" content="My Website" />

Question:* What is the special character value for an non-breaking space?

Answer: •

Question:* Scripts should be loaded where?

Answer: • <head></head>

Question:* What tag is used to create a table row?

Answer: • <tr>

Question:* What is the 'alt' attribute use for?

Answer: • To specify alternative text for an image

Question:* Which of these is a well-formed input field?

Answer: • <input type="text" name="name" id="id" />

Question:* Who wrote the current XHTML standard?

Answer: • The World Wide Web Consortium (W3C)

Question:* XHTML elements should always be written in:

Answer: • lower case

Question:* XHTML is HTML defined as what type of application?

Answer: • XML

Question:* What does XHTML stand for?

Answer: • Extensible hypertext markup language

Question:* What is the primary difference between HTML and XHTML?

Answer: • XHTML documents must be well-formed and valid according to the XHTML schema.

Question:* Which of the following is valid XHTML?

Answer: • <p class="bodyPara">Foo bar!</p>

Question:* Which of the following creates a button?

Answer: • <input type="button" value="Hello world!">

Question:* What does DOM stand for?

Answer: • document object model

Question:* Which of these are well-formed nesting?

Answer: • <div><h1>Goodbye!</h1></div>

Question:* Fill in the blank for the 'rel' attribute used in the following: <link href="source.css" type="text/css" rel="__"

Answer: • stylesheet

Question:* Which of these links will validate in XHTML 1.0 Strict?

Answer: • <a class="link" href="page.html">Link</a>

Question:* Choose the correct XHTML break tag from the following:

Answer: • <br />

Question:* Which of the following will set up a numbered list?

Answer: • <ol> <li>One</li> <li>Two</li> <li>Three</li> </ol>

Question:* Which element is correctly formatted XHTML?

Answer: • <li>One</li>

Question:* What's the right way to write a comment in XHTML?

Answer: • <!-- ... -->

Question:* What is the correct usage of a well formed heading tag?

Answer: • <h3>Heading</h3>

Question:* Which XHTML has properly nested elements?

Answer: • <p><i>Here is some text</i></p>

Question:* The <title> tag goes inside what tag?

Answer: • <head></head>

Question:* What does the attribute 'href" specify?

Answer: • URL

Question:* The DOCTYPE declaration is required:

Answer: • All of these

Question:* Which is the correct value for an email link?

Answer: • <a href="mailto:joe@domain.com">joe@domain.com</a>

Question:* The correct tag for defining a table row is:

Answer: • <tr>

Question:* Which of the following is 'well-formed' XHTML format?

Answer: • <div id="groovy">Ain't it?</div>

Question:* What is the proper tag for comments in XHTML?

Answer: • <!--comment-->

Question:* What does it mean to say that an XHTML document is 'well-formed'?

Answer: • All of these.

Question:* What is the proper syntax for a horizontal line?

Answer: • <hr />

Question:* What does <strong> tag do to text?

Answer: • bold

Question:* Which of the following is the correct way to use a paragraph in XHTML?

Answer: • <p></p>

Question:* Which of these elements are form elements?

Answer: • All of these

Question:* Which of the following are correctly formatted?

Answer: • <ul><li><p>Some content</p></li></ul>

Question:* Which of the following is valid XHTML?

Answer: • <body><p><b>Ferret!</b></p><p>Another ferret!</p></body>

Question:* Which is NOT a valid value for the 'target' attribute?

Answer: • _inner

Question:* The XML namespace attribute is mandatory in:

Answer: • All of these

Question:* In the opening form tag, which is a mandatory attribute?

Answer: • action

Question:* Which of these is a valid conditional statement to target all versions of IE.

Answer: • <!--[if IE]> <link href="styles.css" rel="stylesheet"/> <![endif]-->

Question:* Which of these, by default, is a block-level element?

Answer: • p

Question:* Which browser does NOT support XHTML?

Answer: • Internet Explorer 8

Question:* Which is the correct formatting of an object tag?

Answer: • <object type="application/x-shockwave-flash" data="silly.swf" width="700" height="500"></object>

Question:* Which of the following is a correct processing instruction?

Answer: • <?xml version="1.0" encoding="UTF-8"?>

Question:* Which of these is correct application of an anchor link?

Answer: • <a href="#link">Link</a> <div id="link">Here</div>

Question:* Which of the following is NOT one of the DTD's for XHTML?

Answer: • Quirks

Question:* Which of these is the correct XHTML usage of the Language attribute?

Answer: • <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

Question:* Which is the correct XHTML for empty elements?

Answer: • Go fly a kite<hr />

Question:* What are the required elements for XHTML documents?

Answer: • <html>, <head>, <title>, <body>

Question:* Which of the following is a well formed table?

Answer: • <table> <tr> <td>Cell</td> <td>Cell</td> </tr> <tr> <td colspan="2">Cell</td> </tr> </table>

Question:* The <base> tag goes inside what tag?

Answer: • <head></head>

Question:* In which tag do you define the XML namespace?

Answer: • <html>

Question:* Which DOCTYPE does not include deprecated elements(i.e. <font>)?

Answer: • Strict

Question:* To reload or redirect a page in a specified amount of time in XHTML, you would use which of the following?

Answer: • <meta http-equiv="refresh" content="2;url=http://www.google.com/" />

Question:* Which of the following is NOT a benefit of using XHTML?

Answer: • A browser will render it, even with errors.

Question:* Which tag has NOT been deprecated with XHTML?

Answer: • <textarea>

Question:* How do XPath statements vary between HTML and XHTML?

Answer: • The namespace is almost always required in XHTML.

Question:* Which DOCTYPE does include deprecated elements(i.e. <font>)?

Answer: • Transitional

Question:* What is a namespace?

Answer: • A predicate that is used to make a set of elements unique and avoid conflict

Question:* Which of these image attributes are NOT supported?

Answer: • action

Question:* To embed an iframe on a web page, you would use which method?

Answer: • <iframe class="iframe-video" src="video.mp3"></iframe>

Question:* What is the difference between the @name and @id attributes?

Answer: • HTML references elements by @name; XHTML can only reference elements by @id.

Question:* Which tag has NOT been deprecated with XHTML?

Answer: • <hr>

Question:* Why shouldn't you treat normally non-empty elements as empty elements (i.e., why shouldn't you use '<p />')?

Answer: • HTML parsers will think you are declaring the element named 'p /', which is nonsense.

Question:* Why should you make sure empty elements have a space before the close (i.e., <br /> instead of <br/>)?

Answer: • Some browsers read <br/> as declaring the element named "br/", which is nonsense.

Question:* Attribute 'name' has been replaced with what attribute for the following elements: a, iframe, img?

Answer: • id

Question:* The correct method for including a stylesheet is:

Answer: • All of these are correct

Question:* What is the minimum sufficient XHTML document, not including declarations?

Answer: • <html><head><title></title></head><body></body></html>

Question:* Which is a correctly formatted nested bulleted list?

Answer: • <ul> <li>Planes <ul> <li>Red</li> <li>White</li> <li>Blue</li> </ul> </li> <li>Trains</li> <li>Automobiles</li> </ul>

Question:* In unicode support, what's the difference between XHTML 1.1 and HTML 4.01?

Answer: • HTML supports all unicode characters and non-characters; XHTML has a few restrictions.

Question:* What is a correct document type declaration for XHTML?

Answer: • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Question:* What is the best practice for italicizing content?

Answer: • <p style="font-style:italic">content</p>

Question:* Why doesn't the JavaScript command "document.write();" work in XHTML?

Answer: • It results in malformed documents

Question:* What is the difference between XHTML and HTML regarding whitespace?

Answer: • In XHTML, all spans of whitespace are shortened to a single space; in HTML, they are preserved

Question:* What is wrong with this doctype declaration? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

Answer: • The doctype declaration has no closing tag.

Question:* What happens if you do not include the XHTML default namespace in the declaration?

Answer: • All XHTML elements must be preceded by 'http://www.w3.org/1999/xhtml:'

Question:* How many parsing modes does XHTML have?

Answer: • One

Question:* What is the most proper MIME type for an XHTML document?

Answer: • application/xhtml+xml

Question:* Which of these is a correct <form> in XHTML?

Answer: • "<form action="formSubmit" method="post"> Email: <input type="text" id="emailInput" /> Yes, subscribe me to your mailing list: <input type="checkbox" checked="checked" /> &

Question:* Which of the following is valid XHTML?

Answer: • <span style="background-color: #abc;">Foo > bar</span>

Question:* Which of the following character entities cannot be used in XHTML?

Answer: •

Question:* Why is getting the MIME type correct important?

Answer: • If the browser doesn't know it's XHTML, then it won't work right

Question:* What happens if you put an XHTML <![CDATA[ .... ]]> element in HTML?

Answer: • It is ignored as an incorrectly-formatted comment.

Question:* What is the primary difference between XHTML 1.0 and XHTML 1.1?

Answer: • XHTML 1.1 includes Ruby annotations

Question:* What are the character encodings that are guaranteed to work properly for an XHTML document?

Answer: • UTF-8 and UTF-16

Question:* Which is a complete list of XHTML versions?

Answer: • 1.0, 1.1, 5

Question:* What is the correct formatting of a horizontal rule?

Answer: • <rule>

Show more