Click here to get back home

W3C Spec: Block level content within ? Style in ? Why?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
W3C Spec: Block level content within ? Style in ? Why? laurence 06-09-2005
Posted by laurence on June 9, 2005, 6:20 am
Please log in for more thread options


I am implementing a comprehensive image-map generator utility, so have been
studying W3C HTML 4.01 Specification
(http://www.w3.org/TR/html4/struct/objects.html#h-13.6) on image maps (among
other things).

I note the document specifies that block level content can be included
within a <map>. Testing this in order to discover why one might wish to do
this, I find the block level content is rendered in page flow order anyway,
and not magically associated with (say) the image that uses the map.

Among elements which might be included within the <map> is specifically
mentioned the anchor (<a>) element. Testing this, I find the anchors are
rendered as normal anchors, again, in page flow order.

It is not clear to me how any advantage is gained by placing such content
within an image map. Indeed, such inclusion appears only to confuse the
organisation of the file. Does anybody know the intended use of this
facility?

Related to this, I note that anchor tags may include the 'shape' attribute,
presumably intended for use in the same way as this attribute in <area>
tags. Testing it, I find I cannot get <a> elements to express any shape but
that of their normal content.

Related to this also is the facility to provide both <map> and <area> tags
with style, either inline or with class attributes. Testing has yielded no
discernible effect with any style properties one might think to apply.

Does any W3C guru have answers for these mysteries? (Or is it just that my
testing has been conducted with IE? - even if that is the problem, block
content in maps still needs explanation).

Thanks in advance

Laurence



Posted by Harlan Messinger on June 8, 2005, 6:31 pm
Please log in for more thread options


laurence wrote:

[question about the newer format for the contents of the MAP element]

It lets you provide a single set of navigation elements *as* a single
set in your content while presenting them in two alternative ways, each
preferred by a particular set of users. See

http://www.gavelcade.com/tests/imagemaps.html

The idea is that you present your navigational elements in an
accessible, text-based format, but that by wrapping them in a MAP
element, you are making them available for *reuse* as an image map for
those users who will benefit from one.

A thought occurred to me, that they ought to have done the same thing
with <map name="..."> that they did with <a name="...">, that is, make
it unnecessary. Instead of requiring

        <img ... usemap="#mymap">
        <!-- ... -->
        <map name="mymap" ...>
                <div ...>
                        <!-- ... content ... -->
                </div>
        </map>

they ought to have made it possible to write

        <img ... usemap="#mymap">
        <!-- ... -->
        <div id="mymap" ...>
                <!-- ... content ... -->
        </div>

because the MAP tag serves no real purpose.


Posted by Lauri Raittila on June 9, 2005, 1:14 am
Please log in for more thread options


in comp.infosystems.www.authoring.html, Harlan Messinger wrote:
> laurence wrote:

> they ought to have made it possible to write
>
>         <img ... usemap="#mymap">
>         <!-- ... -->
>         <div id="mymap" ...>
>                 <!-- ... content ... -->
>         </div>
>
> because the MAP tag serves no real purpose.

But then you couldn't have to map elements with same name? Wouldn't that
be shame? (no, I have no idea why it is allowed in HTML4...)

Anyway, I assume reason is of course backwards compatibility. And I think
that the map element is maybe worst defined in whole spec...

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/buy-opera.html?AID=882173


Posted by Harlan Messinger on June 9, 2005, 11:50 am
Please log in for more thread options


Lauri Raittila wrote:
> in comp.infosystems.www.authoring.html, Harlan Messinger wrote:
>
>>laurence wrote:
>
>
>>they ought to have made it possible to write
>>
>>        <img ... usemap="#mymap">
>>        <!-- ... -->
>>        <div id="mymap" ...>
>>                <!-- ... content ... -->
>>        </div>
>>
>>because the MAP tag serves no real purpose.
>
>
> But then you couldn't have to map elements with same name? Wouldn't that
> be shame?

:) Right, if you had two MAP elements with the same name, the browser
wouldn't know which one to use. It would be like having two A tags with
the same name on the same page,

        <a name="myanchor">

To which of these would a hyperlink tagged

        <a href=#myanchor">

go? And yet it's not a spec violation.

Oh, wait: the spec *does* say that the NAME attribute for an A tag needs
to be unique. It doesn't say that for the MAP tag, though. It should.

> (no, I have no idea why it is allowed in HTML4...)
>
> Anyway, I assume reason is of course backwards compatibility. And I think
> that the map element is maybe worst defined in whole spec...

Posted by laurence on June 9, 2005, 9:20 am
Please log in for more thread options



> laurence wrote:
>
> [question about the newer format for the contents of the MAP element]
>
> It lets you provide a single set of navigation elements *as* a single set
> in your content while presenting them in two alternative ways, each
> preferred by a particular set of users. See
>
> http://www.gavelcade.com/tests/imagemaps.html
>
> The idea is that you present your navigational elements in an accessible,
> text-based format, but that by wrapping them in a MAP element, you are
> making them available for *reuse* as an image map for those users who will
> benefit from one.

That's great Harlan, thanks. This dual use of the links is apparently not
supported in MSIE, but works a treat in Firefox. Good info, and great
example.

> A thought occurred to me, that they ought to have done the same thing with
> <map name="..."> that they did with <a name="...">, that is, make it
> unnecessary. Instead of requiring
>
> <img ... usemap="#mymap">
> <!-- ... -->
> <map name="mymap" ...>
> <div ...>
> <!-- ... content ... -->
> </div>
> </map>
>
> they ought to have made it possible to write
>
> <img ... usemap="#mymap">
> <!-- ... -->
> <div id="mymap" ...>
> <!-- ... content ... -->
> </div>
>
> because the MAP tag serves no real purpose.

Could it be that maps will not always contain renderable content (apart from
hotspots on image/object), and so should not then make their presence felt
on a page in the form of a div?
Also, maps can be used by more than one image; their location in a div, at
some particular page location doesn't make much sense.

In experimenting with your code, I found that adding <area> elements to the
map (for it is decreed you can mix these elements within a map) appear to
cancel out the A regions in Firefox. Only the AREA regions work as
hot-spots. Interesting.


Thanks for the explanation Harlan,
and thanks to other contributors too.

Now, if only someone would enlighten me as to style being applied to map &
area tags...
Laurence.




Similar ThreadsPosted
In HTML spec,are "href" and "style" called "attribute"?....@@ January 29, 2005, 11:14 am
Multiple-level Table of Contents April 6, 2006, 9:59 am
Help with multi level category navigation April 11, 2006, 1:50 pm
Double-spacing 1st List Level, but not Nested Levels July 9, 2006, 8:24 pm
XHTML DOCTYPE breaks JavaScript x.style.top and x.style.left? July 5, 2005, 12:58 pm
Is Html4.01 spec(http://www.w3.org/TR/REC-html40/) downly compatible to older editions such like Html4.0? April 20, 2005, 3:26 am
table inside div block - no joy April 2, 2006, 6:26 pm
How to make block elements flow? May 15, 2005, 6:50 pm
DTD? Is address element block or inline? December 15, 2005, 10:16 pm
IE7 Display:BLock and line breaks March 27, 2008, 2:41 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap