While HTML is case-insensitive, and modern usage suggests that everyone uses all lowercase, I prefer to keep my tags and attributes separated by using uppercase on tags and lowercase on attributes, with event attributes being a combination. The syntax file remains set as case-insensitive to follow the convention of the HTML standard. FWIW, HTML shows up as a tag and html shows up as an attribute using the syntax file as it is now. It is only dir that is showing up incorrectly. I would appreciate help in determining why this is happening.
The keyword sections are as follows:
- keywords 1 - valid primary tags (HTML, TITLE, etc.)
keywords 2 - valid secondary tags (tables, lists, BR, HR, SPAN)
keywords 3 - invalid tags (TT, STRIKE, etc.)
keywords 4 - valid attributes (dir, class etc.)
keywords 5 - invalid attributes (face, width, height, etc.)
keywords 6 - valid event attributes (onHover, onClick, etc.)
Code: Select all
; TextPad syntax definitions for HTML
; Copyright (C) 1998-2002, Helios Software Solutions
HTML=1
[Syntax]
Namespace1 = 3
IgnoreCase = Yes
KeyWordLength =
BracketChars =
OperatorChars = -=-
PreprocStart =
HexPrefix = #
SyntaxStart = <
SyntaxEnd = >
CommentStart = !--
CommentEnd = -->
CommentStartAlt =
CommentEndAlt =
SingleComment =
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = Yes
StringStart = "
StringEnd = "
StringAlt = '
StringEsc =
CharStart = &
CharEnd = ;
CharEsc =
;Duplicate primary and secondary keywords
; CODE
; DIR
; FRAME
; HTML
; LABEL
; LINK
; SPAN
; STYLE
; TITLE
[Keywords 1]
!DOCTYPE
A
ABBR
ADDRESS
AREA
ARTICLE
ASIDE
AUDIO
B
BASE
BDI
BDO
BLOCKQUOTE
BODY
BUTTON
CANVAS
CITE
CODE
DEL
DETAILS
DFN
DIALOG
DIV
EM
FIGCAPTION
FIGURE
H1
H2
H3
H4
H5
H6
HEAD
HEADER
HTML
I
IFRAME
ILAYER
IMG
INS
KBD
KEYGEN
LAYER
LEGEND
LINK
MAIN
MAP
MARK
MENU
META
NAV
OBJECT
OUTPUT
P
PARAM
PICTURE
PRE
PROGRESS
Q
RP
RT
RUBY
S
SAMP
SCRIPT
SECTION
SERVER
SMALL
SOUND
SOURCE
STRONG
STYLE
SUB
SUP
SVG
TEMPLATE
TIME
TITLE
TRACK
U
VAR
VIDEO
WBR
[Keywords 2]
BR
CAPTION
COL
COLGROUP
DATA
DATALIST
DD
DL
DT
FIELDSET
FORM
HR
INPUT
LABEL
LI
OL
OPTGROUP
OPTION
SELECT
SPAN
TABLE
TBODY
TD
TEXTAREA
TFOOT
TH
THEAD
TR
UL
[Keywords 3]
ACRONYM
APPLET
BASEFONT
BGSOUND
BIG
BLINK
CENTER
DIR
EMBED
FONT
FRAME
FRAMESET
HEADERS
ISINDEX
KEY
LISTING
MARQUEE
MENUITEM
MULTICOL
NOBR
NOEMBED
NOFRAMES
NOLAYER
NOSCRIPT
PLAINTEXT
SPACER
STRIKE
TT
XMP
[Keywords 4]
accesskey
action
alt
background
balance
behavior
bgproperties
checked
class
classid
clear
code
codebase
codetype
cols
colspan
command
compact
content
context
contextmenu
controls
coords
data
datafld
dataformatas
datasrc
default
direction
disabled
dynsrc
enctype
event
for
hidden
href
hspace
html
http
equiv
icon
id
ismap
label
lang
language
leftmargin
loop
lowsrc
marginheight
marginwidth
maxlength
mayscript
method
methods
multiple
name
nohref
noresize
noshade
nowrap
palette
pluginspage
public
radiogroup
rb
rbc
readonly
rel
rev
rightmargin
rows
rowspan
rp
rt
rtc
rules
scroll
scrollamount
scrolldelay
scrolling
selected
shape
size
span
src
start
style
stylesheet
tabindex
target
text
title
topmargin
truespeed
type
url
urn
usemap
value
volume
vrml
vspace
wrap
[Keywords 5]
align
alink
bgcolor
border
bordercolor
bordercolordark
bordercolorlight
bottommargin
cellpadding
cellspacing
color
face
frame
frameborder
framespacing
height
link
valign
vlink
width
[Keywords 6]
onAbort
onAfterPrint
onBeforePrint
onBeforeUnload
onBlur
onCanPlay
onCanPlayThrough
onChange
onClick
onContextMenu
onCopy
onCueChange
onCut
onDblClick
onDrag
onDragEnd
onDragEnter
onDragLeave
onDragOver
onDragStart
onDrop
onDurationChange
onEmptied
onEnded
onError
onFocus
onHashChange
onInput
onInvalid
onKeyDown
onKeypress
onKeyUp
onLoad
onLoadedData
onLoadedMetaData
onLoadStart
onMouseDown
onMouseMove
onMouseOut
onMouseOver
onMouseUp
onMouseWheel
onOffline
onOnline
onPageHide
onPageShow
onPaste
onPause
onPlay
onPlaying
onPopState
onProgress
onRateChange
onReset
onResize
onScroll
onSearch
onSeeked
onSeeking
onSelect
onStalled
onStorage
onSubmit
onSuspend
onTimeUpdate
onToggle
onUnload
onVolumeChange
onWaiting
onWheel