Re: Content model of <map> (detailed review of Semantics)

I also wondered about this content model.
Since map must contain block level elements and area is only allowed
in a strictly inline context, does that means area elements cannot be
children of map? (i.e. does there need to be a div or similar in
between?) Or am I misunderstanding what "Where strictly inline-level
content is allowed" means?

thanks
Ben


On 9/2/07, Simon Pieters <simonp@opera.com> wrote:
>
> (This is part of my detailed review of the Semantics and structure of HTML
> elements section.)
>
> <map>:
>
>     Content model:
>        Zero or more block-level elements.
>
> <area>:
>
>     Contexts in which this element may be used:
>        Where strictly inline-level content is allowed, but only as a
>        descendant of a map element.
>
> What is the rationale for this content model?
>
> HTML4 allows either block-level elements or <area>s, because in HTML4 you
> could use <a> as areas for an image map, but this is no longer the case in
> HTML5. So naturally the content model of <map> in HTML5 should be "Zero or
> more area elements" and <area> be allowed "in a map element".
>
> You can still duplicate the links in the image map with <a>s in
> block-level elements, you'd just have to place them outside the <map>
> element.
>
> --
> Simon Pieters
> Opera Software
>
>

Received on Sunday, 2 September 2007 02:56:24 UTC