html.nanorc 1.19 KB
Newer Older
1
## Here is an example for HTML.
2

3
syntax "html" "\.html?$"
4
magic "HTML document text"
5
comment "<!--|-->"
6

7
# Tags:
8
color cyan "<[[:alpha:]/!?][^>]*>"
9
10
11
12
# Bold, italic, and underlined:
color brightmagenta "</?[biu]>"

# Named character references:
13
color red "&[^;[:space:]]*;"
14
# Strings:
15
color green ""(\\.|[^"])*""
16

17
18
19
20
21
22
23
24
25
26
27
# Attributes:
color red "(abbr|accept(-charset)?|accesskey|action|alink|align|alt|archive|axis|background|bgcolor|border)="
color red "(cell(padding|spacing)|char(off|set)?|checked|cite|class(id)?|compact|code(base|tag)?|cols(pan)?)="
color red "(content(editable)?|contextmenu|coords|data|datetime|declare|defer|dir|disabled|enctype)="
color red "(for|frame(border)?|headers|height|hidden|href(lang)?|hspace|http-equiv|id|ismap)="
color red "(label|lang|link|longdesc|margin(height|width)|maxlength|media|method|multiple)="
color red "(name|nohref|noresize|noshade|object|onclick|onfocus|onload|onmouseover|profile|readonly|rel|rev)="
color red "(rows(pan)?|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary)="
color red "(tabindex|target|text|title|type|usemap|valign|value(type)?|vlink|vspace|width|xmlns|xml:space)="

# Comments:
28
color yellow start="<!--" end="-->"