HighDots Forums  

Problem validating an image map (html 4.01)

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Problem validating an image map (html 4.01) in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David C. Stone
 
Posts: n/a

Default Problem validating an image map (html 4.01) - 01-02-2006 , 02:03 PM






I'm stuck trying to validate an html 4.01 page that uses an image map.

I copied the second client-side example from here:
<http://www.w3.org/TR/html401/struct/objects.html#h-13.6>

and implemented it here:
<http://www.chem.utoronto.ca/coursenotes/analsci/chrom/hplc.html>

but the W3C validator complains that:

"document type does not allow element "MAP" here; missing one of "P",
"H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag"

I've tried various combinations to get this to work, without success.

Am I missing something obvious, or is there a problem with either the
example or the validator?

Reply With Quote
  #2  
Old   
Rob McAninch
 
Posts: n/a

Default Re: Problem validating an image map (html 4.01) - 01-02-2006 , 04:47 PM






David C. Stone>:
Quote:
I'm stuck trying to validate an html 4.01 page that uses an image map.

I copied the second client-side example from here:
http://www.w3.org/TR/html401/struct/objects.html#h-13.6

and implemented it here:
http://www.chem.utoronto.ca/courseno...hrom/hplc.html

You didn't copy it as the example is laid out. Look again.

--
Rob McAninch
http://rock13.com


Reply With Quote
  #3  
Old   
David C. Stone
 
Posts: n/a

Default Re: Problem validating an image map (html 4.01) - 01-02-2006 , 07:15 PM



In article <FMSdnYLNTZceAyTenZ2dnUVZ_tSdnZ2d (AT) adelphia (DOT) com>, Rob
McAninch <rob_13 (AT) excite (DOT) com> wrote:

Quote:
David C. Stone>:
I'm stuck trying to validate an html 4.01 page that uses an image map.

I copied the second client-side example from here:
http://www.w3.org/TR/html401/struct/objects.html#h-13.6

and implemented it here:
http://www.chem.utoronto.ca/courseno...hrom/hplc.html


You didn't copy it as the example is laid out. Look again.
[homer] D'oh! [/homer] dang end-tags....


Reply With Quote
  #4  
Old   
David C. Stone
 
Posts: n/a

Default Re: Problem validating an image map (html 4.01) - 01-03-2006 , 08:32 AM



In article <41tu62F1g05i1U1 (AT) uni-berlin (DOT) de>, Gérard Talbot
<newsblahgroup (AT) gtalbot (DOT) org> wrote:

Quote:
David C. Stone wrote :
I'm stuck trying to validate an html 4.01 page that uses an image map.

I copied the second client-side example from here:
http://www.w3.org/TR/html401/struct/objects.html#h-13.6
[snip]

Your <map> should be nested inside your <object>, e.g. like this:
Not necessarily - see the example cited above. My problem was I had
added a trailing </p> where there shouldn't have been one.

[snip]
Quote:

Your anchors should be coded like
h2><a name="inject">Injection Valve</a></h2
and not like
h2><a name="inject"></a>Injection Valve</h2> (<- this is an empty anchor)
Thanks, hadn't realised that.

Quote:
Also, note that float: middle is invalid CSS code and is therefore a css
declaration which will be ignored everytime by all browsers
img.centred {
border-left: 5pt solid white;
border-right: 5pt solid white;
float: middle
}

If you want to horizontally align elements (inline or block-level), then
may I suggest this tutorial:

Interactive demo on CSS horizontal alignment and horizontal formating
http://www.gtalbot.org/NvuSection/Nv...Alignment.html
Thanks for the suggested tutorial - I'm still trying to get a handle on
the details of CSS, and it's sometimes a little confusing. Some of the
attributes are notated and work similarly to the way the equivalents
did under pre-CSS html, and some aren't/don't. It's like learning
French in France, then trying to hold conversation in Quebec...


Reply With Quote
  #5  
Old   
Eric Lindsay
 
Posts: n/a

Default Re: Problem validating an image map (html 4.01) - 01-03-2006 , 09:25 PM



In article <41tu62F1g05i1U1 (AT) uni-berlin (DOT) de>,
Gérard Talbot <newsblahgroup (AT) gtalbot (DOT) org> wrote:

Quote:
Your anchors should be coded like
h2><a name="inject">Injection Valve</a></h2
and not like
h2><a name="inject"></a>Injection Valve</h2> (<- this is an empty anchor)
What is wrong with empty anchors? I thought they were allowed?
<!ELEMENT A - - (%inline* -(A) -- anchor -->

Are there actually existing user agents (not Mosaic) that do fail to
find them? Or is this a theoretical problem? I ask because the quick
way to solve some validation problems on my old pages involved ending up
with a lot of empty anchors. If I don't really need to improve my
anchors I'd rather avoid the work. Also I wasn't sure whether using an
attribute name="top" or name="bottom" in some other element was better
supported as a link target.

--
http://www.ericlindsay.com


Reply With Quote
  #6  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: Problem validating an image map (html 4.01) - 01-04-2006 , 04:43 AM



On Wed, 4 Jan 2006, Eric Lindsay wrote:

Quote:
In article <41tu62F1g05i1U1 (AT) uni-berlin (DOT) de>,
Gérard Talbot <newsblahgroup (AT) gtalbot (DOT) org> wrote:

Your anchors should be coded like
h2><a name="inject">Injection Valve</a></h2
and not like
h2><a name="inject"></a>Injection Valve</h2> (<- this is an empty anchor)

What is wrong with empty anchors?
They didn't work on some old browsers. I'm not aware of any that need
to be taken seriously nowadays - but then, if you weren't aimimg for
back-level compatibility, you'd use id= nowadays anyway; so, if you're
going to use <a name=...> at all, I'd recommend going all the way and
including some of the targetted text in the anchor.

Quote:
I thought they were allowed?
!ELEMENT A - - (%inline* -(A) -- anchor --
In that sense they are "allowed", yes.

Quote:
I ask because the quick way to solve some validation problems on my
old pages involved ending up with a lot of empty anchors.
Perhaps if you would be more specific about what problem that was
meant to solve, there could be a better answer. Otherwise, you can
just disregard the advice - I can't recall now which browser/versions
were affected.


Reply With Quote
  #7  
Old   
Eric Lindsay
 
Posts: n/a

Default Re: Problem validating an image map (html 4.01) - 01-04-2006 , 06:54 AM



In article <Pine.LNX.4.62.0601040935580.15999 (AT) ppepc62 (DOT) ph.gla.ac.uk>,
"Alan J. Flavell" <flavell (AT) ph (DOT) gla.ac.uk> wrote:

Quote:
On Wed, 4 Jan 2006, Eric Lindsay wrote:
What is wrong with empty anchors?
I ask because the quick way to solve some validation problems on my
old pages involved ending up with a lot of empty anchors.

Perhaps if you would be more specific about what problem that was
meant to solve, there could be a better answer. Otherwise, you can
just disregard the advice - I can't recall now which browser/versions
were affected.
No serious problem, and it just seemed a safe interim move that would
later let me wipe all the empty anchors in a single move. I'm finally
converting to valid strict 4.01 a 400 page hand written site many years
old that hasn't much consistency, and doing it while the site is live.

One of the bulk search and replaces was easier with empty anchors, so I
have about 600 of them left. Once I get a bit more semantic structure
and consistency in the divs I'll probably go to id for anchors. It just
takes time because I can't figure out how to safely automate some of the
conversions, so I am having to rethink details of my approach as I spot
each conversion problem. Each directory is different, so I can't often
hit all 400 files at once.

Each time I close up a great swag of optionally unclosed tags like lists
and paragraphs my validation fails because of inconsistencies in my
original pages. However batch validation is wonderful for showing where
general problems are.

--
http://www.ericlindsay.com


Reply With Quote
  #8  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Problem validating an image map (html 4.01) - 01-04-2006 , 10:51 AM



Gérard Talbot wrote:
Quote:
David C. Stone wrote :

I'm stuck trying to validate an html 4.01 page that uses an image map.

I copied the second client-side example from here:
http://www.w3.org/TR/html401/struct/objects.html#h-13.6

and implemented it here:
http://www.chem.utoronto.ca/courseno...hrom/hplc.html

but the W3C validator complains that:

"document type does not allow element "MAP" here; missing one of "P",
"H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag"

I've tried various combinations to get this to work, without success.

Am I missing something obvious, or is there a problem with either the
example or the validator?

Your <map> should be nested inside your <object>, e.g. like this:
Only if the list is meant to appear as an alternate to the image map if
the image map can't be rendered. If the goal, as called for by good
accessibility practice, is to provide a list of links somewhere on the
page AND use that list as well to drive the image map, then the map can
be wherever the links ought to appear.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.