I've been messing with the syntax file for HTML. It's hard work because there are many places where you need contexts within other contexts and if you try to use a keyword as a pseudo-context you are limited by newline characters.
Let's summarize so you can choose and merge:
a) This is a MUST. References can't have the "whole" attribute because they are usually in the middle of words and they are ignored:
keyword &*; white/12
prefixásuffix
b) I've heavily coloured the DOCTYPE tag and the HTML version is highlighted (very nice!!!). It's a good thing to enforce standards even if they are $propietary$. It may need some tweaking because I only tried the W3C official DTD's.
c) Use cyan (darker) for closing tags . Not essential.
d) Use yellow (lighter) for top level tags (html, body, stc.)
e) Remark styles as used in CSS. Class, id and pseudo-classes selections are colored. I had problems with color styles (color:#990000) because of the #, same as in the id selector. May need some tweaking.
b) Remark embedded scripts.
I agree to remove tag names and properties, and these are just to enforce the block structure of the file.
There is a css.syntax for Cooledit, but it has similar structure to the old syntax.html. Take a look.
Now for the bad things.
a) We have problems with quoted "" strings within the context when they spread in several lines. I see no way to higlight &xxx; references in them. Same for style definitions {} within the
b) You may dislike the colors...
c) No clue about color numbers, as in yellow/24. I wrote them in a pseudo-random way.
About tidy, it's the only command line checker I know. It's sponsored by W3C and it seems to be included in recent Linux distributions. Try the latest version at SourceForge with the options I sent.
*8-) David
------------------------------------------------
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
Attachment:
html.syntax
Description: Binary data