File: syntax.html

package info (click to toggle)
wdg-html-reference 4.0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,528 kB
  • ctags: 305
  • sloc: makefile: 39
file content (110 lines) | stat: -rw-r--r-- 6,798 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<!-- Thanks for reading the source of this document. Hope you enjoy -->
<!-- what you find here. Please let me know if you find any errors. -->
<HEAD>
<TITLE>Syntax rules</TITLE>
<META NAME="description" CONTENT="Wilbur is the name for the next HTML standard (3.2). Here you can find all the tags in this proposal, including tips on usage and limitations.">
<META NAME="keywords" CONTENT="html authoring, reference, wilbur, tag overview">
<META NAME="generator" CONTENT="Orb v1.3 for OS/2">
<META NAME="author" CONTENT="Arnoud Engelfriet">
<LINK REV="made" HREF="mailto:galactus@htmlhelp.com" TITLE="Wilbur feedback">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080"
ALINK="#000080">
<H1 ALIGN=CENTER>Syntax rules</H1>
<P>
In this <A HREF="./overview.html">overview of tags</A>, I have
used some simple rules to make the syntax clear. It also allows me to
provide the information in a short format.
<P>
To illustrate the syntax rules, here's the section on <A HREF="./special/img.html">IMG</A>:

<HR>
<TABLE>
<TR>
<TH VALIGN=TOP ALIGN=LEFT><B>Appearance:</B></TH> 
<TD VALIGN=TOP>&lt;IMG SRC=<CODE>URL</CODE>&gt;<BR></TD>
</TR>
<TR>
<TH VALIGN=TOP ALIGN=LEFT><B>Attributes:</B></TH> 
<TD VALIGN=TOP><B>SRC=<CODE>URL</CODE></B>, ALT=<CODE>string</CODE>, ALIGN=left|right|top|middle|bottom, HEIGHT=<CODE>n</CODE>, WIDTH=<CODE>n</CODE>, BORDER=<CODE>n</CODE>, HSPACE=<CODE>n</CODE>, VSPACE=<CODE>n</CODE>, USEMAP=<CODE>URL</CODE>, ISMAP<BR></TD>
</TR>
<TR>
<TH VALIGN=TOP ALIGN=LEFT><B>Contents:</B></TH> 
<TD VALIGN=TOP>None (<A HREF="../../glossary/glossary.html#empty">Empty</A>).<BR></TD>
</TR>
<TR>
<TH VALIGN=TOP ALIGN=LEFT><B>May occur in:</B></TH> 
<TD VALIGN=TOP><A HREF="./body/body.html">BODY</A>, <A HREF="./block/h1.html">H1</A>, <A HREF="./block/h2.html">H2</A>, <A HREF="./block/h3.html">H3</A>, <A HREF="./block/h4.html">H4</A>, <A HREF="./block/h5.html">H5</A>, <A HREF="./block/h6.html">H6</A>, <A HREF="./block/p.html">P</A>, <A HREF="./list/li.html">LI</A>, <A HREF="./list/dt.html">DT</A>, <A HREF="./list/dd.html">DD</A>, <A HREF="./block/div.html">DIV</A>, <A HREF="./block/center.html">CENTER</A>, <A HREF="./block/blockquote.html">BLOCKQUOTE</A>, <A HREF="./block/form.html">FORM</A>, <A HREF="./table/td.html">TD</A>, <A HREF="./table/th.html">TH</A>, <A HREF="./block/pre.html">PRE</A>, <A HREF="./block/address.html">ADDRESS</A> as well as <A HREF="./font/tt.html">TT</A>, <A HREF="./font/i.html">I</A>, <A HREF="./font/b.html">B</A>, <A HREF="./font/u.html">U</A>, <A HREF="./font/strike.html">STRIKE</A>, <A HREF="./font/big.html">BIG</A>, <A HREF="./font/small.html">SMALL</A>, <A HREF="./font/sup.html">SUP</A>, <A HREF="./font/sub.html">SUB</A>, <A HREF="./phrase/em.html">EM</A>, <A HREF="./phrase/strong.html">STRONG</A>, <A HREF="./phrase/dfn.html">DFN</A>, <A HREF="./phrase/code.html">CODE</A>, <A HREF="./phrase/samp.html">SAMP</A>, <A HREF="./phrase/kbd.html">KBD</A>, <A HREF="./phrase/var.html">VAR</A>, <A HREF="./phrase/cite.html">CITE</A>, <A HREF="./special/a.html">A</A>, <A HREF="./special/img.html">IMG</A>, <A HREF="./special/font.html">FONT</A>, <A HREF="./special/applet.html">APPLET</A>, <A HREF="./special/br.html">BR</A>, <A HREF="./head/script.html">SCRIPT</A>, <A HREF="./special/map.html">MAP</A>, <A HREF="./special/basefont.html">BASEFONT</A>, <A HREF="./form/input.html">INPUT</A>, <A HREF="./form/select.html">SELECT</A>, <A HREF="./form/textarea.html">TEXTAREA</A> and <A HREF="./misc/pcdata.html">plain text</A>.<BR></TD>
</TR>
</TABLE>
<HR>
<P>
The first section, <EM>Appearance</EM>, gives a common way to use this
tag. As you can see here, the <A HREF="./special/img.html">IMG</A> tag does not have an ending tag.
If the beginning or ending tag appears inside square brackets, it is
optional and may be left off.
<P>
The next section describes the <A
HREF="../../glossary/glossary.html#attribute">attributes</A> for the <A HREF="./special/img.html">IMG</A> tag.
If an attribute appears in <B>bold</B>, it is required, otherwise it
may be omitted. In the above
case, SRC is required, but the other attributes are not. Note that
the attributes themselves are listed in all caps, and the possible
values (if possible) in lower case. Note that an attribute value
<EM>must</EM> be quoted if it contains more than just letters, digits,
hyphens and periods.
<P>
The <EM>contents</EM> section describes which tags are permitted inside
this tag. For <A HREF="./special/img.html">IMG</A>, there are none. And last, you can see which tags
allow <A HREF="./special/img.html">IMG</A> inside them.
<P>
The attributes and their values are noted in a very compact format as
well. The "|" character is used to separate mutually exclusive
attributes or values. For example, <CODE>A=foo|bar</CODE> indicates
that attribute "A" may get foo or bar as value, but not both, or
anything else. <CODE>A=<CODE>string</CODE>|B=<CODE>string</CODE></CODE> indicates
that you may use either A <EM>or</EM> B, but not both.
<P>
If an attribute can take more possible values than can be given in a
list, the following special symbols are used:
<DL>
<DT><CODE>n</CODE>
<DD>A number. It must be an integer, and not have a "-" or "+" sign
prepended. Numbers do not have to be enclosed in quotes.
<DT><CODE>p%</CODE>
<DD>A percentage. The percentage must also be an integer. Exactly
what the percentage applies to depends on the tag. Percentages must
be enclosed in quotes.
<DT><CODE>URL</CODE>
<DD>An URL. This can be an absolute or a relative URL, depending on
the situation. In most cases, both are permitted. It is recommended
that URLs always be enclosed in quotes.
<DT><CODE>string</CODE>
<DD>A string of characters. Any character is permitted, including
entities. It is recommended that strings are always enclosed in
quotes.
<DT><CODE>#RRGGBB</CODE>
<DD>A color code, in hexadecimal notation. The color is constructed
in the red-green-blue format. Each part gets a hexadecimal number
between 00 and FF, and it should be given in two digits at all times.
Note that a color code must have a # as the first character, and
it must be enclosed in quotes.
</DL>
<HR>
<CENTER>
<P>
<B><IMG SRC="./icon/wdglogo-small.gif" WIDTH=105 HEIGHT=40 ALT="Web Design Group" ALIGN=RIGHT></B><BR>
<A HREF="./index.html" TITLE="Index for Wilbur">Wilbur index</A>&nbsp;~
<A HREF="./overview.html" TITLE="Overview of HTML 3.2 tags">Tag overview</A>&nbsp;~
<A HREF="mailto:galactus@htmlhelp.com" TITLE="Wilbur reference feedback">Feedback</A>
<P>
<SMALL>
Copyright &copy; 1997 <A HREF="http://www.stack.nl/%7Egalactus/">Arnoud "Galactus" Engelfriet</A>.
</SMALL>
</CENTER>
</BODY>
</HTML>