Browsable HTML Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: html/allilaire/extracted
Source used for this grammar: Freddy Allilaire, HTML 1.0, HTML.ecore, 2005/04/15

Summary

Syntax

Boolean ::=
	"true"
	"false"
String ::=
	string
Integer ::=
	integer
HTML ::=
	[head]::HEAD [body]::BODY
HTMLElement ::=
	HEAD
HTMLElement ::=
	HEADElement
HTMLElement ::=
	BODY
HTMLElement ::=
	BODYElement
HTMLElement ::=
	[value]::String [children]::HTMLElement+ [parent]::HTMLElement
HEAD ::=
	[headElements]::HEADElement+ [html]::HTML
HEADElement ::=
	LINK
HEADElement ::=
	TITLE
LINK ::=
	[rel]::String [title]::String [ahref]::String [type]::String
TITLE ::=
	[head]::HEAD
BODY ::=
	[background]::String [bgcolor]::String [text]::String [link]::String [alink]::String [vlink]::String [bodyElements]::BODYElement+ [html]::HTML
BODYElement ::=
	H1
BODYElement ::=
	H2
BODYElement ::=
	H3
BODYElement ::=
	H4
BODYElement ::=
	EM
BODYElement ::=
	STRONG
BODYElement ::=
	B
BODYElement ::=
	I
BODYElement ::=
	TT
BODYElement ::=
	PRE
BODYElement ::=
	BIG
BODYElement ::=
	SMALL
BODYElement ::=
	SUB
BODYElement ::=
	SUP
BODYElement ::=
	STRIKE
BODYElement ::=
	FONT
BODYElement ::=
	IMG
BODYElement ::=
	BR
BODYElement ::=
	MAP
BODYElement ::=
	AREA
BODYElement ::=
	STYLE
BODYElement ::=
	EMBED
BODYElement ::=
	NOEMBED
BODYElement ::=
	SPAN
BODYElement ::=
	A
BODYElement ::=
	DIV
BODYElement ::=
	P
BODYElement ::=
	TABLEElement
H1 ::=
	[body]::BODY
H2 ::=
	[body]::BODY
H3 ::=
	[body]::BODY
H4 ::=
	[body]::BODY
EM ::=
	[body]::BODY
STRONG ::=
	[body]::BODY
B ::=
	[body]::BODY
I ::=
	[body]::BODY
TT ::=
	[body]::BODY
PRE ::=
	[body]::BODY
BIG ::=
	[body]::BODY
SMALL ::=
	[body]::BODY
SUB ::=
	[body]::BODY
SUP ::=
	[body]::BODY
STRIKE ::=
	[body]::BODY
FONT ::=
	[color]::String [face]::String [size]::String
IMG ::=
	[src]::String [width]::String [height]::String [alt]::String [align]::String [vspace]::String [hspace]::String [ismap]::String [usemap]::String [border]::String
BR ::=
	[clear]::String
MAP ::=
	[body]::BODY
AREA ::=
	[shape]::String [coords]::String [ahref]::String
STYLE ::=
	[body]::BODY
EMBED ::=
	[src]::String [width]::String [height]::String [align]::String [vspace]::String [hspace]::String [border]::String
NOEMBED ::=
	[body]::BODY
SPAN ::=
	[style]::String
A ::=
	[ahref]::String [name]::String [id]::String
DIV ::=
	[align]::String
P ::=
	[body]::BODY
TABLEElement ::=
	TABLE
TABLEElement ::=
	TR
TABLEElement ::=
	TD
TABLE ::=
	[border]::String [width]::String [cellspacing]::String [cellpadding]::String [trs]::TR+
TR ::=
	[valign]::String [align]::String [table]::TABLE [tds]::TD+
TD ::=
	TH
TD ::=
	[colspan]::String [rowspan]::String [valign]::String [align]::String [width]::String [tr]::TR
TH ::=
	[colspan]::String [rowspan]::String [valign]::String [align]::String [width]::String [tr]::TR
FORM ::=
	[action]::String [method]::String
INPUT ::=
	[align]::String [maxlength]::String [size]::String [checked]::String [src]::String [inputValue]::String [name]::String [type]::String
TEXTAREA ::=
	[name]::String [rows]::String [cols]::String
SELECT ::=
	[multiple]::String [size]::String [name]::String
OPTION ::=
	[selected]::String [optionValue]::String
ListElement ::=
	OL
ListElement ::=
	UL
ListElement ::=
	LI
OL ::=
	[start]::String
UL ::=
	[type]::String
LI ::=
	[liValue]::String
DL ::=
	ε
DT ::=
	ε
DD ::=
	ε
APPLET ::=
	[applet]::String [class]::String [src]::String [align]::String [width]::String [height]::String
PARAM ::=
	[name]::String [paramValue]::String
OBJECT ::=
	[classid]::String [id]::String [data]::String [type]::String [standby]::String
FRAMESET ::=
	[rows]::String [cols]::String [framespacing]::String [frameborder]::String [border]::String
FRAME ::=
	IFRAME
FRAME ::=
	[src]::String [name]::String [marginwidth]::String [marginheight]::String [scrolling]::String [noresize]::String
NOFRAME ::=
	ε
IFRAME ::=
	[src]::String [name]::String [marginwidth]::String [marginheight]::String [scrolling]::String [noresize]::String

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []