DEVFYI - Developer Resource - FYI

Every element must have an end tag, even when it doesn't really matter.

XHTML Interview Questions and Answers


(Continued from previous question...)

23. Every element must have an end tag, even when it doesn't really matter.

<br>
<input type="text" value="Amazon.com" size="20" >

becomes
<br />
<input type="text" value="Amazon.com" size="20" />

For compatibility with older browsers its best to put a single space before the '/'. Some browsers have trouble with "<br></br>" so its best to use "<br />"

(Continued on next question...)

Other Interview Questions