<map> and Strict 4.01

D

dorayme

A small curiosity (at least for me):

I notice that when cleaning up some old stuff of mine to Strict
4.01 from Transitional, one or two pages struck "problems" of
validation, I was surprised by this not being kosher:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>...</title>
</head>
<body>
<map name="singles">
<area shape="rect" coords="200,100,300,120" href="c10.html"
alt="click here to go to page 10">
</map>
</body>
</html>

whereas if I wrap <map...>...</map> in a div, page validates and
displays as usual and works as with the Transitional doctype or
even as the invalid one above.

URL available if anyone is interested in this or needs it to test
anything. Wrapping in a div was just the first thing to pop into
my head. Is there better, given it is convenient to use <map...>?
 
M

mbstevens

On Thu, 28 Dec 2006 13:42:32 +1100, dorayme wrote:


Is there better, given it is convenient to use <map...>?

I would use whatever semantically represents the content as I intended it.
Headers, paragraphs, pres, divs, or address.

But also consider this article:
http://www.alistapart.com/articles/imagemap/

(Actually, I have managed to get away without using maps altogether
for the last few years.) :)
 
D

dorayme

mbstevens said:
On Thu, 28 Dec 2006 13:42:32 +1100, dorayme wrote:


Is there better, given it is convenient to use <map...>?

I would use whatever semantically represents the content as I intended it.
Headers, paragraphs, pres, divs, or address.

But also consider this article:
http://www.alistapart.com/articles/imagemap/

(Actually, I have managed to get away without using maps altogether
for the last few years.) :)

I hardly ever use them any more. Taking the opportunity over the
Xmas break to tidy up a few things I did ages ago without redoing
them completely. I re read the section on map in 4.01 in the last
few mins and I have no real puzzle now.

[I wrote a few stories once and did the pages in SuperPaint (like
Illustrator but easier) intended for printing but easiest to
adapt for web by using the very economical gif-pages (most are 8
to 12k), on only one or two did I need to get links going from
within the gifs). I was thinking, maybe I would not do it this
way these days but I am not sure... it would be an awful bother
to do the sort of thing I was doing, essentially a picture story
with the text placed within the pics in various pictorially
appropriate places. But if it was just for online and I was
starting from scratch, I would likely do it differently and keep
the text html and rethink all...]

I better read your link...
 
H

Harlan Messinger

dorayme said:
A small curiosity (at least for me):

I notice that when cleaning up some old stuff of mine to Strict
4.01 from Transitional, one or two pages struck "problems" of
validation, I was surprised by this not being kosher:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>...</title>
</head>
<body>
<map name="singles">
<area shape="rect" coords="200,100,300,120" href="c10.html"
alt="click here to go to page 10">
</map>
</body>
</html>

whereas if I wrap <map...>...</map> in a div, page validates and
displays as usual and works as with the Transitional doctype or
even as the invalid one above.

MAP is inline, and BODY can't have inline children under Strict.

I'm trying to figure out what your page does.
 
D

dorayme

Harlan Messinger said:
MAP is inline, and BODY can't have inline children under Strict.

Thanks, of course, that explains it (at least to me, particular
case of something general)
I'm trying to figure out what your page does.

Fair enough, you mean if you suddenly landed in it by mistake...
I was tidying up old things (some way to go I guess):

I assume you are saying accessibility markup is left out. This is
the sort of thing I was interested in. I almost never use image
maps these days... but still, as an exercise, refurbishing some
old stuff, I am wondering about it and must put it in for good
form. Not that it would be likely to help anyone really in this
particular case. But in more serious cases, yes...
 
H

Harlan Messinger

dorayme said:
Fair enough, you mean if you suddenly landed in it by mistake...
I was tidying up old things (some way to go I guess):

I assume you are saying accessibility markup is left out. This is
the sort of thing I was interested in. I almost never use image
maps these days... but still, as an exercise, refurbishing some
old stuff, I am wondering about it and must put it in for good
form. Not that it would be likely to help anyone really in this
particular case. But in more serious cases, yes...

Actually, what I meant was that I didn't know what a web page that has
nothing on it but a MAP would be for. Although it just now occurred to
me--the USEMAP attribute can take a full URL, can't it? I've only seen
it as usemap="#somefragment" but it only now comes to me that it could
just as easily be usemap="somepage#somefragment". In that case the MAP
on it can be "called" like a subroutine from other pages, instead of
having to repeat the map on each of those pages. Is that how you were
using it?
 
D

dorayme

Harlan Messinger said:
Actually, what I meant was that I didn't know what a web page that has
nothing on it but a MAP would be for. Although it just now occurred to
me--the USEMAP attribute can take a full URL, can't it? I've only seen
it as usemap="#somefragment" but it only now comes to me that it could
just as easily be usemap="somepage#somefragment". In that case the MAP
on it can be "called" like a subroutine from other pages, instead of
having to repeat the map on each of those pages. Is that how you were
using it?

You will find examples of the rare use I have ever made of client
side <map>s at

<http://tinyurl.com/ym2slq> on "pages" 9 and 10 of the story.

and

<http://tinyurl.com/yjamlr> on page 17 over the deliberately
unmarked link over the words in brackets "(pages 10 to 13)"

I give you these to set some context to the use of the client
side <map>. I think it is an apt enough use of it.

I also think the use of JS popups on page 9 and 10 is apt but I
mention in case you have JS off for that particular url. Happily
enough, I have iCab set up to open popups in separate tabs, it is
not as nice aesthetically, but it is quite convenient for keeping
ones place after having persused the different and beatiful fonts
enlarged. I don't particularly like the idea of sending folk off
to a separate page for the enlargements but... it is probably the
sort of thing i would do if I was starting from scratch. I could
do it now... but you know what? I rather like having a few
examples of things in my stable... "Here is my JS page, here are
popups" Perhaps museum pieces!

[As I have said, I am not sure I would do all this this way these
days. Just doing the minimum to tidy up these two old stories
prepared for print (and other personal things over the Xmas
break!). I even forget how I prepared the pics for the web, I may
even have scanned the booklet that was made of the stories? I am
noticing all sorts of things from this exercise, eg. that IE 6 is
not too bad at rendering the gifs, but iCab is terrible, Safari
the best in terms of smoothness and no bit map jaggie effect...
anyway, all by the way...]

Hope you can see something, I am fiddling about with it...
 
J

Jukka K. Korpela

Scripsit Harlan Messinger:
Although it just now occurred to
me--the USEMAP attribute can take a full URL, can't it?

By the specifications, yes.
I've only seen
it as usemap="#somefragment" but it only now comes to me that it could
just as easily be usemap="somepage#somefragment".

It could, but browsers don't support that, so it's not used.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,069
Latest member
SimplyleanKetoReviews

Latest Threads

Top