Correct syntax for image map in HTML5

381 views
Skip to first unread message

ohce...@gmail.com

unread,
Jul 11, 2013, 12:54:25 PM7/11/13
to web-au...@googlegroups.com
Hi,

I'm using something like the following for an image map in BBedit 10.5.4 with a document type of HTML5 <!DOCTYPE html>:

    <img src="image.jpg" alt="Some image" usemap="#imgmap" />
    <map name="imgmap">
        <area shape="circle" coords="50,50,70" href="index.html" alt="Home Page" />
    </map>

Where I've looked, this is the correct usage of these elements, but BBedit flags the following syntax errors:

1) Value of attribute “usemap” for element “<img>” must begin with one of {A-Z,a-z} followed by zero or more of {A-Z,a-z,0-9,-,_,:,.}.

2) Document type does not permit element “<area>” in content of element “<map>”.
 
3) Value of attribute “coords” for element “<area>” is invalid; Value must be one of {“Circle, Polygon, Rectangle”}.

Is there any obvious reason that I don't see (or am aware of) why these would be errors in HTML5?

Thanks,

Ed H.


Phil Brubaker

unread,
Jul 11, 2013, 6:18:37 PM7/11/13
to web-au...@googlegroups.com
Well they are HTML 4. How do I set things up for HTML version 4?

Thanks, Phil
>
> Thanks,
>
> Ed H.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Web Authoring" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to web-authorin...@googlegroups.com.
> To post to this group, send email to web-au...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


Ed. Floden

unread,
Jul 12, 2013, 8:49:51 AM7/12/13
to web-au...@googlegroups.com
These would appear to be bugs in BBEdit. Send a message to support.

The "coords" attribute is a list of integers, not names; "Value must be one of {“Circle, Polygon, Rectangle”}" only applies to the "shape" attribute. And the correct values are "circle", "poly", and "rect"; "polygon", "rectangle" (and "circ") are noted as non-conforming.

See <http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-map-element>.

Ed.


ohce...@gmail.com

unread,
Jul 12, 2013, 7:23:18 PM7/12/13
to web-au...@googlegroups.com
They were aware of the issue and it will be addressed in a future release.
Reply all
Reply to author
Forward
0 new messages