"Whenever possible, put styles in ..?.. and put scripts in ..?..", "an external style sheet (.css) file, an external JavaScript (.js) file", "Write the code so that the following script passes XHTML validation, while at the same time working in older browsers also. (Don't worry about the really old browsers that don't even know of the existence of JavaScript):

<script type='text/javascript'>
document.write('Hello world.');
</script>
", "<script type='text/javascript'>
/* <![CDATA[ */
document.write('Hello world.');
/* ]]> */
</script>

The CDATA tag tells the XHTML parser to treat the JavaScript data as character data.", "XHTML doesn't allow the nobr tag. What should you use instead?", "white-space: nowrap", "In XHTML, all tags must be ..?..", "In XHTML, all tags must be closed, either with a /> at the end of the open tag, or, with a separate closing tag. For example:

right: <br />
wrong: <br>

If there is no content after the tag, you should close the tag at the end of the open tag, instead of having a separate closing tag. For example:

right: <img alt='photo' src='photo.jpg' />
wrong: <img alt='photo' src='photo.jpg'></img>

An exception to this rule is the script tag. Even if the only purpose of a given script tag is to reference content from an external javascript file, it should use a closing script tag:

right: <script type='text/javascript' src='mycode.js'></script>
wrong: <script type='text/javascript' src='mycode.js' />", "With XHTML, all attributes should be enclosed...", "in single or double quotes.

right: <img alt='Home' width='270' height='100' src='images/welcome.gif' />
wrong: <img alt=Home width=270 height=100 src=images/welcome.gif />", "Write the code for a form which posts data from textarea xyz to program abc.php.", "<form method='post' action='abc.php'>
<textarea rows='10' cols='50' name='xyz'></textarea>
<input type='submit'>
</form>", "Is this correct: </br>", "no. that would be the syntax of the closing tag if the br tag had an opening tag. But it's both an opening and closing tag rolled into one, same as the img tag, therefore the syntax is <br />. "Is this correct? <td width='300' bgcolor='#eee'>", "You can abbreviate background colors in CSS, but not necessarily in HTML -- depends on the browser.", "With XHTML, are tags case-sensitive?", "XHTML tags must be lower case:

right: <p>Hello.</p>
wrong: <P>Hello.</P>", "Using frames, how would you create a 3-column page whose column widths are the following?
Column 1: 300 pixels
Column 2: two thirds of the remaining page width
Column 3: one third of the remaining page width", "<frameset cols='300, 2*, *'>
<frame src='frame1.htm'>
<frame src='frame2.htm'>
<frame src='frame3.htm'>
</frameset>", "Is this correct syntax:
<p>
<h3>Section 1</h3>
this is Section 1.
</p>", "No. Heading tags should not be embedded within paragraph tags", "Is this correct?

<script language='javascript' src='mycode.js'></script>", "language='javascript' is incorrect. use type='text/javascript':

<script type='text/javascript' src='mycode.js'></script>", "What HTML tag is deprecated and should no longer be used?", "Don't use the <center> tag. It was deprecated in order to reduce the mixing of layout and content. Use text-align:center; in your CSS instead.", "With XHTML, what do you need to know about the img tag?", "Don't use 'align', 'border' or 'name' in the img tag. Instead of the 'border' attribute, use the 'border' CSS property:

img { border:none; }
img.has-border { border: 1px solid #0000ff; }"