DEVFYI - Developer Resource - FYI

Ampersands in hrefs must convert "&" to "&" in the URI

XHTML Interview Questions and Answers


(Continued from previous question...)

13. Ampersands in hrefs must convert "&" to "&" in the URI

<a href="http://www.phonelists.com/cgi-bin/Handler.pl?ListID=Test&Password=test&action=View">Sample List</a>

becomes
<a href="http://www.phonelists.com/cgi-bin/Handler.pl?ListID=Test&Password=test&action=View">Sample List</a>

# The attribute "name" becomes "id" when used for a locator inside a document

For example, to reference a section within a document with a URI, we usually do something like
"<a href="favoriteAnimals.html#meerkats">Meerkats</a>"

Inside the referenced section,
<a name="meerkats"><h2>Meerkats of Africa</h2></a>

becomes
<a id="meerkats"><h2>Meerkats of Africa</h2></a>
or better yet for backwards compatibility:
<a id="meerkats" name="meerkats"><h2>Meerkats of Africa</h2></a>
# Tidy
tidy is a tool to automatically convert HTML to XHTML. You can find it at http://www.w3.org/People/Raggett/tidy/.

(Continued on next question...)

Other Interview Questions