Html Grammar

The rules are in alphabetical order. The starting rule for an entire document is named html_document.
a_content
::=
heading
 
|
text
a_tag
::=
<a>
   
{a_content}0
   
</a>
abbr_tag
::=
<abbr> text </abbr>
acronym_tag
::=
<acronym> text </acronym>
address_content
::=
p_tag
 
|
text
address_tag
::=
<address>
   
{address_content}0
   
</address>
applet_content
::=
{<param>}0
   
body_content
applet_tag
::=
<applet> applet_content </applet>
b_tag
::=
<b> text </b>
basefont_tag
::=
<basefont> body_content </basefont>
bdo_tag
::=
<bdo> text </bdo>
big_tag
::=
<big> text </big>
blink_tag
::=
<blink> text </blink>
block
::=
{block_content}0
block_content
::=
<isindex>
 
|
basefont_tag
 
|
blockquote_tag
 
|
center_tag
 
|
dir_tag
 
|
div_tag
 
|
dl_tag
 
|
form_tag
 
|
listing_tag
 
|
menu_tag
 
|
multicol_tag
     
 
|
nobr_tag
 
|
ol_tag
 
|
p_tag
 
|
pre_tag
 
|
table_tag
 
|
ul_tag
 
|
xmp_tag
blockquote_tag
::=
<blockquote> body_content </blockquote>
body_content
::=
<bgsound>
 
|
<hr>
 
|
address_tag
 
|
block
 
|
del_tag
 
|
heading
 
|
ins_tag
 
|
layer_tag
 
|
map_tag
 
|
marquee_tag
 
|
text
body_tag
::=
<body>
   
{body_content}0
   
</body>
caption_tag
::=
<caption> body_content </caption>
center_tag
::=
<center> body_content </center>
cite_tag
::=
<cite> text </cite>
code_tag
::=
<code> text </code>
colgroup_content
::=
{<col>}0
colgroup_tag
::=
<colgroup>
   
colgroup_content
content_style
::=
abbr_tag
 
|
acronym_tag
 
|
cite_tag
 
|
code_tag
 
|
dfn_tag
 
|
em_tag
 
|
kbd_tag
 
|
q_tag
 
|
strong_tag
 
|
var_tag
dd_tag
::=
<dd> flow </dd>
del_tag
::=
<del> flow </del>
dfn_tag
::=
<dfn> text </dfn>
dir_tag[b]
::=
<dir>
   
{li_tag}
   
</dir>
div_tag
::=
<div> body_content </div>
dl_content
::=
dt_tag dd_tag
dl_tag
::=
<dl>
   
{dl_content}
   
</dl>
dt_tag
::=
<dt>
   
text
   
</dt>
em_tag
::=
<em> text </em>
fieldset_tag
::=
<fieldset>
   
[legend_tag]
   
{form_content}0
   
</fieldset>
flow
::=
{flow_content}0
flow_content
::=
block
 
|
text
font_tag
::=
<font> style_text </font>
form_content[c]
::=
<input>
 
|
<keygen>
 
|
body_content
 
|
fieldset_tag
 
|
label_tag
 
|
select_tag
 
|
textarea_tag
form_tag
::=
<form>
   
{form_content}0
   
</form>
frameset_content
::=
<frame>
 
|
noframes_tag
frameset_tag
::=
<frameset>
   
{frameset_content}0
   
</frameset>
h1_tag
::=
<h1> text </h1>
h2_tag
::=
<h2> text </h2>
h3_tag
::=
<h3> text </h3>
h4_tag
::=
<h4> text </h4>
h5_tag
::=
<h5> text </h5>
     
h6_tag
::=
<h6> text </h6>
head_content
::=
<base>
 
|
<isindex>
 
|
<link>
 
|
<meta>
 
|
<nextid>
 
|
style_tag
 
|
title_tag
head_tag
::=
<head>
   
{head_content}0
   
</head>
heading
::=
h1_tag
 
|
h2_tag
 
|
h3_tag
 
|
h4_tag
 
|
h5_tag
 
|
h6_tag
html_content
::=
head_tag body_tag
 
|
head_tag frameset_tag
html_document
::=
html_tag
html_tag
::=
<html> html_content </html>
i_tag
::=
<i> text </i>
ilayer_tag
::=
<ilayer> body_content </ilayer>
ins_tag
::=
<ins> flow </ins>
kbd_tag
::=
<kbd> text </kbd>
label_content[d]
::=
<input>
 
|
body_content
 
|
select_tag
 
|
textarea_tag
label_tag
::=
<label>
   
{label_content}0
   
</label>
layer_tag
::=
<layer> body_content </layer>
legend_tag
::=
<legend> text </legend>
li_tag
::=
<li> flow </li>
listing_tag
::=
<listing> literal_text </listing>
map_content
::=
{<area>}0
map_tag
::=
<map> map_content </map>
marquee_tag
::=
<marquee> style_text </marquee>
menu_tag[e]
::=
<menu>
   
{li_tag}0
   
</menu>
multicol_tag
::=
<multicol> body_content </multicol>
nobr_tag
::=
<nobr> text </nobr>
noembed_tag
::=
<noembed> text </noembed>
noframes_tag
::=
<noframes>
   
{body_content}0
   
</noframes>
noscript_tag
::=
<noscript> text </noscript>
object_content
::=
{<param>}0
   
body_content
object_tag
::=
<object> object_content </object>
ol_tag
::=
<ol>
   
{li_tag}
   
</ol>
optgroup_tag
::=
<optgroup>
   
{option_tag}0
   
</optgroup>
option_tag
::=
<option> plain_text </option>
p_tag
::=
<p> text </p>
physical_style
::=
b_tag
 
|
bdo_tag
 
|
big_tag
 
|
blink_tag
 
|
font_tag
 
|
i_tag
 
|
s_tag
 
|
small_tag
 
|
span_tag
 
|
strike_tag
 
|
sub_tag
 
|
sup_tag
 
|
tt_tag
 
|
u_tag
pre_content
::=
<br>
 
|
<hr>
 
|
a_tag
 
|
style_text
pre_tag
::=
<pre>
   
{pre_content}0
   
</pre>
q_tag
::=
<q> text </q>
s_tag
::=
<s> text </s>
samp_tag
::=
<samp> text </samp>
script_tag[f]
::=
<script> plain_text </script>
select_content
::=
optgroup_tag
 
|
option_tag
select_tag
::=
<select>
   
{select_content}0
   
</select>
server_tag [g]
::=
<server> plain_text </server>
small_tag
::=
<small> text </small>
span_tag
::=
<span> text </span>
strike_tag
::=
<strike> text </strike>
strong_tag
::=
<strong> text </strong>
style_tag
::=
<style> plain_text </style>
sub_tag
::=
<sub> text </sub>
sup_tag
::=
<sup> text </sup>
table_cell
::=
td_tag
 
|
th_tag
table_content
::=
<tbody>
 
|
<tfoot>
 
|
<thead>
 
|
tr_tag
table_tag
::=
<table>
   
[caption_tag]
   
{colgroup_tag}0
   
{table_content}0
   
</table>
td_tag
::=
<td> body_content </td>
text
::=
{text_content}0
text_content
::=
<br>
 
|
<embed>
 
|
<iframe>
 
|
<img>
 
|
<spacer>
 
|
<wbr>
 
|
a_tag
 
|
applet_tag
 
|
content_style
 
|
ilayer_tag
 
|
noembed_tag
 
|
noscript_tag
     
 
|
object_tag
 
|
physical_style
 
|
plain_text
textarea_tag
::=
<textarea> plain_text </textarea>
th_tag
::=
<th> body_content </th>
title_tag
::=
<title> plain_text </title>
tr_tag
::=
<tr>
   
{table_cell}0
   
</tr>
tt_tag
::=
<tt> text </tt>
u_tag
::=
<u> text </u>
ul_tag
::=
<ul>
   
{li_tag}
   
</ul>
var_tag
::=
<var> text </var>
xmp_tag
::=
<xmp> literal_text </xmp>

Related Posts:
  • HTML Extension HTM or HTML Extension? When you save an HTML file, you can use either the .htm or the .html extension. We use .htm in our examples. It is a habit from the past, when the software only allowed three letters in file extension… Read More
  • Divs and spans Divs and spans are two tags that, when used well, can help give your page a logical structureand some extra hooks to apply any CSS or DOM scripting that you might need later. Whenused badly, they can litter your document unn… Read More
  • HTML Paragraph HTML ParagraphParagraphs are defined with the <p> tag.<p>This is a paragraph</p><p>This is another paragraph</p>HTML '<p>' tag example<html><head><title>Example on the us… Read More
  • Character Entities  Character Entities The following table lists the defined standard and proposed character entities for HTML and XHTML, as well as several that are nonstandard but generally supported. Entity names, if defined… Read More
  • HTML Tags HTML stands for Hyper Text Markup LanguageHTML language, called tags, are words or acronyms surrounded by brackets. A typical HTML tag looks like this:<tag>  Example Of An HTML Tag </tag>There are four tags … Read More
  • HTML Examples HTML headings are defined with the <h1> to <h6> tags.<h1>This is a heading</h1><h2>This is a heading</h2><h3>This is a heading</h3>HTML ParagraphsHTML paragraphs are defined wi… Read More
  • HTML Intro What is HTML?HTML is a language for describing web pages.    HTML stands for Hyper Text Markup Language    HTML is not a programming language, it is a markup language    A markup … Read More
  • XHTML vs. HTML The question of whether to use XHTML or HTML will often not even come up in an averageweb project; most web designers these days will naturally gravitate toward XHTML, asit is perceived as being new, advanced, and the “X” ma… Read More
  • Table basics in HTML It’s reasonably straightforward to create a simple table when hand-coding markup. Thebare essentials of a single table is an opening <table> tag, followed by at least one tablerow (a <tr>), followed by at least o… Read More
  • Layers Spacers and multiple columns are natural extensions to conventional HTML, existing within a document's normal flow. With version 4, Netscape took HTML into an entirely new dimension with layers. It transforms the single-… Read More
  • six HTML heading tags heading ::= h1_tag | h2_tag | h3_tag | h4_tag | h5_tag … Read More
  • id and class attributes The id attribute is used to identify elements and mark up specific functional areas of a website, and the class attribute is used to classify one or more elements. These important attributes help you target elements when it … Read More
  • Multicolumn Layout Multicolumn text formatting is one of the most common features of desktop publishing. In addition to creating attractive pages in a variety of formats, multiple columns let you present your text using shorter, easier-to-… Read More
  • Anatomy of an XHTML document Finally, let’s look at how a strict XHTML 1.0 document is laid out:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtm… Read More
  • HTML Headings Headings are defined with the <h1> to <h6> tags. <h1> defines the largest heading. <h6> defines the smallest heading. <h1>This is a heading</h1> <h2>This i… Read More