Hi!
on Thursday, November 5, 2009 at 18:34 [email protected] wrote:
> On Wed, 4 Nov 2009, David Dorward wrote:
>>
>> On 4 Nov 2009, at 15:18, Stuart Foulstone wrote:
>>
>> > Since links are inline elements, they shouldn't contain block elements,
>> > such as <div> and <p>.
>> >
>> > Why not use <span> (native) inline elements?
>>
>>
>> Because it screws up the semantics.
>
> SPAN, like DIV, has no semantic meaning; how can it screw it up?
Well if one changes from
<a>
<div>
<h3></h3>
<p></p>
</div>
</a>
to
<a>
<span>
<h3></h3>
<p></p>
</span>
</a>
the problem remains. It is just shifted from the div to the h3 and p
tags. So you would have to change these tags to spans too and that
would screw up the semantics.
I would do it like this:
<div>
<a></a>
<h3><a></a></h3>
<p><a></a></p>
</div>
and make the first empty a display block and span the entire div. The
other two a-Tags are fallbacks if css is turned off.
It is more markup, but it validates. and the semantics are kept.
regards
Martin
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************