This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > October 2005 > Proper XHTML for <area> and <map>





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Proper XHTML for <area> and <map>
RWZAction

2005-10-13, 6:20 pm

:confused;Tidy reports DreamWeaver XHTML code for <area> and <map> as
incorrect; DreamWeaver reports Tidy's suggested as code incorrect.
THIS?
Tidy marks the following as incorrect xhtml: ?Warning: inserting implicit <a>,
then ?Warning: missing </a> before <area>

<div id="bpmlayer" style="position:absolute; width:319px; height:19px;
z-index:1; left: 322px; top: 92px; overflow: hidden; visibility: hidden;">
<a href="javascript:;"
onMouseOver="MM_showHideLayers('aboutuslayer','','hide','bpmlayer','','show','so
lutionslayer','','hide','productslayer','','hide','serviceslayer','','hide','par
tnerslayer','','hide','librarylayer','','hide')"
onMouseOut="MM_showHideLayers('aboutuslayer','','hide','bpmlayer','','hide','sol
utionslayer','','hide','productslayer','','hide','serviceslayer','','hide','part
nerslayer','','hide','librarylayer','','hide')"><img
src="/images/sec_nav_bpm.gif" name="sec_nav_bpm" width="319" height="19"
border="0" usemap="#sec_nav_bpmMap" id="sec_nav_bpm" />
<map name="sec_nav_bpmMap">
<area shape="rect" coords="4,0,87,22" href="/bpm/WhatisBPM.cfm" alt="What
Is BPM?" title="What Is BPM?" />
<area shape="rect" coords="90,0,207,22" href="/bpm/BPMImperative.cfm"
alt="The BPM Imperative" title="The BPM Imperative" />
<area shape="rect" coords="210,0,317,22" href="/bpm/WhyActionWorks.cfm"
alt="Why ActionWorks" title="Why ActionWorks" />
</map>
</a>
</div>

OR THIS?
Tidy suggests the following as ?clean? xhtml, but DreamWeaver highlights code
as incorrect.

<div id="bpmlayer" style="position:absolute; width:319px; height:19px;
z-index:1; left: 322px; top: 92px; overflow: hidden; visibility: hidden;">
<a href="javascript:;"
onMouseOver="MM_showHideLayers('aboutuslayer','','hide','bpmlayer','','show','so
lutionslayer','','hide','productslayer','','hide','serviceslayer','','hide','par
tnerslayer','','hide','librarylayer','','hide')"
onMouseOut="MM_showHideLayers('aboutuslayer','','hide','bpmlayer','','hide','sol
utionslayer','','hide','productslayer','','hide','serviceslayer','','hide','part
nerslayer','','hide','librarylayer','','hide')"><img
src="/images/sec_nav_bpm.gif" name="sec_nav_bpm" width="319" height="19"
border="0" usemap=" #sec_nav_bpmMap" id="sec_nav_bpm" />
<map name="sec_nav_bpmMap" id="sec_nav_bpmMap">
<a href="javascript:;"
onmouseover="MM_showHideLayers('aboutuslayer','','hide','bpmlayer','','show','so
lutionslayer','','hide','productslayer','','hide','serviceslayer','','hide','par
tnerslayer','','hide','librarylayer','','hide')"onmouseout="MM_showHideLayers('a
boutuslayer','','hide','bpmlayer','','hide','solutionslayer','','hide','products
layer','','hide','serviceslayer','','hide','partnerslayer','','hide','librarylay
er','','hide')"></a>
<area shape="rect" coords="4,0,87,22" href="/bpm/WhatisBPM.cfm" alt="What
Is BPM?" title="What Is BPM?" />
<area shape="rect" coords="90,0,207,22" href="/bpm/BPMImperative.cfm"
alt="The BPM Imperative" title="The BPM Imperative" />
<area shape="rect" coords="210,0,317,22" href="/bpm/WhyActionWorks.cfm"
alt="Why ActionWorks" title="Why ActionWorks" />
</map>
</a>
</div>
So what is right?

PeteC

2005-10-13, 6:20 pm

RWZAction wrote:
> incorrect; DreamWeaver reports Tidy's suggested as code incorrect.


Put both versions of the page through the validator at
http://validator.w3.org and use whichever one is shown as valid.

HTH,

Pete.
--
Peter Connolly
http://www.acutecomputing.co.uk
Derby
UK
Skype ID: acutecomputing


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews