Abstract
Page:9
HTML
document structure tags
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> SGML tag given above HTML tag
Common Attributes
Common attributes can be given to most of the tags.
Core Attributes
ID attribute uniquely identifies an element within a document. No two elements can have the same ID value in a single document.
The CLASS attribute specifies the element to be a member of one or more classes. Classes allow authors to define specific kinds of a given element.
The STYLE attribute allows authors to specify style rules inline for a single occurrence of an element
The TITLE attribute provides a title for an element and is commonly implemented as a "tooltip" on visual browsers
Internationalization Attributes
The LANG attribute specifies the language of an element's attribute values and its content
The DIR attribute specifies the directionality of text--left-to-right (DIR=ltr, the default) or right-to-left (DIR=rtl).
Top-level Elements
HTML</HTML>Attr: VERSION=CDATA (HTML version) internationalization attributes
HEAD>...</HEAD> Attr: PROFILE=URI (dictionary of meta info) internationalization attributes
BODY>...</BODY>
Attr: BACKGROUND=URI(background image of document)
BGCOLOR=Color (background color )
TEXT=Color (text color ) LINK=Color (link color )
VLINK=Color (visited link color )
ALINK=Color (active link color )
ONLOAD=Script ONUNLOAD=Script common attributes
<FRAMESET>...</FRAMESET>
Attr: ROWS=MultiLengths (row lengths "*,100" )
COLS=MultiLengths (column lengths)
ONLOAD=Script ONUNLOAD=Script and core attributes
FRAME> (with in a frame set)
Attr: NAME=CDATA (name of frame)
SRC=URI (content of frame)
LONGDESC=URI (long description of frame)
FRAMEBORDER=[ 1 | 0 ] (frame border)
MARGINWIDTH=Pixels (margin width)
MARGINHEIGHT=Pixels (margin height)
NORESIZE (disallow frame resizing)
SCROLLING=[ yes | no | auto ] core attributes
NOFRAMES>alternate code contained in body </NOFRAMES> Attr: common attributes
Head Elements
<BASE> Attr: HREF=URI (base URI reference) specifies base URL whose path will be taken by any other URL without path in the document
TARGET=FrameTarget (frame to render links in)
LINK>
Attr: REL=LinkTypes (relationship to link)
REV=LinkTypes (relationship from link)
HREF=URI (hypertext reference)
TYPE=ContentType (content-type of link)
TARGET=FrameTarget (frame to render link in)
MEDIA=MediaDesc (media appropriate for link)
HREFLANG=LanguageCode (language of link)
CHARSET=Charset (character encoding of link)
common attributes
ContentTypeà text/html, image/jpeg, model/vrml, video/quicktime, application/java, text/css, and text/javascript
LinkTypesà Copyright: web site’s copyright page, Glossary: Glossary of terms of site, help: help page, home: homepage, index: indexpage, made: mail to URL pointing to the email address of the page author, next: previous: next and previous pages, Stylesheet: file containing style information, toc: site table of contents, up: the page above the current page in site’s hierarchy.
MediaDesc àscreen (the default); tv; projection, for projectors; handheld; print; all;
META>Attr: NAME=Name (property name) or
HTTP-EQUIV=Name (HTTP response header name)
CONTENT=CDATA (associated data)
SCHEME=CDATA (form of data).
internationalization attributes.
http-equiv=”refresh” content=”5; url_name”
http-equiv=”expires” content=”date”
name: author, keywords, generator, description. Keywords are separated by , in content.
Scheme: the type of information eg. “9 digit zip code”
SCRIPT>...</SCRIPT> Attr: TYPE=ContentType (content-type of scripting language)
LANGUAGE=CDATA (scripting language name)
SRC=URI (external script location)
CHARSET=Charset (character encoding of external script)
DEFER (script execution may wait)
<SCRIPT TYPE="text/javascript" SRC="foo.js" CHARSET="ISO-8859-1">
STYLE>...</STYLE>
Attr: TYPE=ContentType (content-type of style language)
MEDIA=MediaDesc (media to apply style to)
TITLE=Text (title of style sheet)
internationalization attributes (for the TITLE)
TITLE>...</TITLE> internationalization attributes
Generic Block-level Elements
ADDRESS>If you have any questions about ordering, contact us at <A HREF="mailto:"> </A>,or phone our offices at 555-5555.
</ADDRESS> common attributes
<BLOCKQUOTE> block quotation... </BLOCKQUOTE>
Attr: CITE=URI (source of quotation) not supported by many browsers and common attributes
CENTER>...</CENTER> common attributes
DEL>...</DEL> displays text as strike through
Attr: CITE=URI (reason for deletion)
DATETIME=Datetime (date and time of deletion)
common attributes
DIV>...</DIV> The DIV element defines a generic block-level container, allowing authors to provide style or language information to blocks of content.
Attr: ALIGN=[ left | center | right | justify ] (horizontal alignment) and common attributes
<H1>...</H1> same upto h6
Attr: ALIGN=[ left | center | right | justify ] (horizontal alignment) and common attributes
INS> content that has been inserted</INS>
Attr: CITE=URI (reason for insertion)
DATETIME=Datetime (date and time of insertion)
common attributes
INS CITE="../changes.html#h-A.1.2" DATETIME="1997-12-19T00:00:00-05:00">Note that CENTER is changed</INS> common attributes
NOSCRIPT>alternate content for a client-side script not executed</NOSCRIPT> Attr: common attributes
P>...</P> Attr: ALIGN=[ left | center | right | justify ] (horizontal alignment) and common attributes
PRE>...</PRE>
Attr: WIDTH=Number (line width) and common attributes
Lists
All lists take Attr: COMPACT (compact display) and common attributes
DIR>contains one or more LI elements </DIR>
DL>definition list is created using <DT>defined term</DT> and <DD> it’s definition</DD</DL>
<MENU>contains one or more LI elements </MENU>
OL>...</OL>
Attr: TYPE=[ 1 | a | A | i | I ] (numbering style)
START=Number (starting number)
UL>...</UL>
Att: TYPE=[ disc | square | circle ] (bullet style)
LI>...</LI> Attr: TYPE=[ disc | square | circle | 1 | a | A | i | I ] (style of list item marker)
VALUE=Number (number in sequence, always an integer)
common attributes. Contained in OL, UL, DIR, MENU
Tables
TABLE>...</TABLE>
Att: SUMMARY=Text (purpose/structure of table)
WIDTH=Length (table width)
BORDER=Pixels (border width)
FRAME=[ void | above | below | hsides | lhs | rhs | vsides | box | border ] (outer border)
RULES=[ none | groups | rows | cols | all ] (inner borders)
CELLSPACING=Length (spacing between cells)
CELLPADDING=Length (spacing within cells)
ALIGN=[ left | center | right ] (table alignment)
BGCOLOR=Color (table background color)
common attributes
CAPTION>must be first in TABLE </CAPTION>
Attr: ALIGN=[ top | bottom | left | right ] (caption alignment) and common attributes
THEAD>a group of header rows </THEAD>
Attr: ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)
CHAR=Character (alignment character for cells)
CHAROFF=Length (alignment character offset)
VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group) and common attributes
<TBODY>...</TBODY>
Attr: ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)
CHAR=Character (alignment character for cells)
CHAROFF=Length (alignment character offset)
VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group) and common attributes
TFOOT>...</TFOOT>
Attr: ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)
CHAR=Character (alignment character for cells)
CHAROFF=Length (alignment character offset)
VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group) and common attributes
TR>...</TR>
Attr: ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)
CHAR=Character (alignment character for cells)
CHAROFF=Length (alignment character offset)
VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group)
BGCOLOR=Color (row background color)
common attributes
TD>...</TD>
Attr: ROWSPAN=Number (rows spanned by the cell)
COLSPAN=Number (columns spanned by the cell)
HEADERS=IDREFS (list of header cells for current cell)
ABBR=Text (abbreviation for header cell)
SCOPE=[ row | col | rowgroup | colgroup ] (cells covered by header cell)
AXIS=CDATA (category of header cell)
ALIGN=[ left | center | right | justify | char ] (horizontal alignment)
CHAR=Character (alignment character)
CHAROFF=Length (alignment character offset)
VALIGN=[ top | middle | bottom | baseline ] (vertical alignment)
WIDTH=Pixels (cell width) HEIGHT=Pixels (cell height)
NOWRAP (suppress word wrap)
BGCOLOR=Color (cell background color)
common attributes
TH>...</TH>
Attr: ROWSPAN=Number (rows spanned by the cell)
COLSPAN=Number (columns spanned by the cell)
HEADERS=IDREFS (list of header cells for current cell)
ABBR=Text (abbreviation for header cell)
SCOPE=[ row | col | rowgroup | colgroup ] (cells covered by header cell)
AXIS=CDATA (category of header cell)
ALIGN=[ left | center | right | justify | char ] (horizontal alignment)
CHAR=Character (alignment character)
CHAROFF=Length (alignment character offset)
VALIGN=[ top | middle | bottom | baseline ] (vertical alignment)
WIDTH=Pixels (cell width) HEIGHT=Pixels (cell height)
BGCOLOR=Color (cell background color)
NOWRAP (suppress word wrap) common attributes
Forms
FORM>...</FORM>Attr: ACTION=URI (form handler)
METHOD=[ get | post ] (HTTP method for submitting form)
ENCTYPE=ContentType (content type to submit form as)
ACCEPT-CHARSET=Charsets (character encodings)
TARGET=FrameTarget (frame to render form result in)
ONSUBMIT=Script (form was submitted)
ONRESET=Script (form was reset) and common attributes
BUTTON>...</BUTTON>
Attr: NAME=CDATA (key in submitted form)
VALUE=CDATA (value in submitted form)
TYPE=[ submit | reset | button ] (type of button)
DISABLED (disable button)
ACCESSKEY=Character (shortcut key)
TABINDEX=Number (position in tabbing order)
ONFOCUS=Script (element received focus)
ONBLUR=Script (element lost focus) common attributes
FIELDSET>grouping related form controls,must begin with a LEGEND</FIELDSET>
LEGEND>defines a caption for form controls grouped </LEGEND>
Attr: ACCESSKEY=Character (shortcut key)
ALIGN=[ top | bottom | left | right ] (alignment relative to fieldset) common attributes
INPUT>
Attr: TYPE=[ text | password | checkbox | radio | submit | reset | file | hidden | image | button ] (type of input)
NAME=CDATA (key in submitted form)
VALUE=CDATA (value of input)
CHECKED (check radio button or checkbox)
SIZE=CDATA (suggested number of characters for text)
MAXLENGTH=Number (maximum number of characters for text input)
SRC=URI (source for image)
ALT=CDATA (alternate text for image input)
USEMAP=URI (client-side image map)
ALIGN=[ top | middle | bottom | left | right ] (alignment of image input) DISABLED (disable element)
READONLY (prevent changes)
ACCEPT=ContentTypes (media types for file upload)
ACCESSKEY=Character (shortcut key)
TABINDEX=Number (position in tabbing order)
ONFOCUS=Script (element received focus)
ONBLUR=Script (element lost focus)
ONSELECT=Script (element text selected)
ONCHANGE=Script (element value changed)
common attributes
LABEL>...</LABEL>
Attr: FOR=IDREF (associated form field)
ACCESSKEY=Character (shortcut key)
ONFOCUS=Script (element received focus)
ONBLUR=Script (element lost focus)
common attributes
SELECT>...</SELECT>
Attr: NAME=CDATA (key in submitted form)
MULTIPLE (allow multiple selections)
SIZE=Number (number of visible options)
DISABLED (disable element)
TABINDEX=Number (position in tabbing order)
ONFOCUS=Script (element received focus)
ONBLUR=Script (element lost focus)
ONCHANGE=Script (element value changed)
common attributes
OPTGROUP>...</OPTGROUP>
Attr: LABEL=Text (group label)
DISABLED (disable group of choices)
common attributes
OPTION>...</OPTION>
Attr: VALUE=CDATA (value of option)
SELECTED (choice initially selected)
DISABLED (disable choice)
LABEL=Text (option label) common attributes
TEXTAREA>...</TEXTAREA>
Attr: NAME=CDATA (key in submitted form)
ROWS=Number (number of rows)
COLS=Number (number of columns)
DISABLED (disable element)
READONLY (prevent changes)
ACCESSKEY=Character (shortcut key)
TABINDEX=Number (position in tabbing order)
ONFOCUS=Script (element received focus)
ONBLUR=Script (element lost focus)
ONSELECT=Script (element text selected)
ONCHANGE=Script (element value changed)
common attributes
Special Inline Elements
<A>...</A>Attr: HREF=URI (hypertext reference)
NAME=CDATA (named link destination)
REL=LinkTypes (relationship to link)
REV=LinkTypes (relationship from link)
TYPE=ContentType (content-type of link)
TARGET=FrameTarget (frame to render link in)
HREFLANG=LanguageCode (language of link)
CHARSET=Charset (character encoding of link)
ACCESSKEY=Character (shortcut key)
TABINDEX=Number (position in tabbing order)
SHAPE=[ rect | circle | poly | default ] (client-side image map)
COORDS=Coords (client-side image map)
ONFOCUS=Script (element received focus)
ONBLUR=Script (element lost focus) common attributes
APPLET>...</APPLET> Attr: CODE=CDATA (class file)
CODEBASE=URI (base URI for class files)
WIDTH=Length (applet width)
HEIGHT=Length (applet height)
ARCHIVE=CDATA (archive files)
OBJECT=CDATA (serialized applet)
NAME=CDATA (name for inter-applet communication)
ALT=Text (alternate text)
ALIGN=[ top | middle | bottom | left | right ] (applet alignment)
HSPACE=Pixels (horizontal gutter)
VSPACE=Pixels (vertical gutter) common attributes
<applet code="helloworld.class" name="helloworld" width=150 height=25</applet>
BASEFONT>
Attr: SIZE=CDATA (font size adjustment)
COLOR=Color (font color adjustment)
FACE=CDATA (font face adjustment) ID=ID (unique ID)
BDO>overrides the bidirectional algorithm </BDO>
Attr: DIR=[ ltr | rtl ] (directionality of text)
LANG=LanguageCode (language of text) core attributes
BR> Attr: CLEAR=[ left | all | right | none ] (clear floating objects) core attributes
FONT>...</FONT>
Attr: SIZE=CDATA (font size adjustment)
COLOR=Color (font color adjustment)
FACE=CDATA (font face adjustment) common attributes
IFRAME>...</IFRAME>
Attr: SRC=URI (URI of frame content)
NAME=CDATA (name of frame)
LONGDESC=URI (link to long description)
WIDTH=Length (frame width)
HEIGHT=Length (frame height)
ALIGN=[ top | middle | bottom | left | right ] (frame alignment)
FRAMEBORDER=[ 1 | 0 ] (frame border)
MARGINWIDTH=Pixels (margin width)
MARGINHEIGHT=Pixels (margin height)
SCROLLING=[ yes | no | auto ] (ability to scroll)
core attributes
IMG>Attr: SRC=URI (location of image)
ALT=Text (alternate text)
LONGDESC=URI (link to long description)
WIDTH=Length (image width)
HEIGHT=Length (image height)
USEMAP=URI (client-side image map)
ISMAP (server-side image map)
ALIGN=top|middle|bottom|left|right (image alignment)
BORDER=Length (link border width)
HSPACE=Pixels (horizontal gutter)
VSPACE=Pixels (vertical gutter) common attributes
MAP>one or more AREA</MAP>
Attr: NAME=CDATA (name of map) common attributes
AREA>
Attr: SHAPE=[ rect | circle | poly | default ] (shape of region)
COORDS=Coords (coordinates of region)
HREF=URI (linked resource)
TARGET=FrameTarget (frame to render link in)
NOHREF (inactive region)
ALT=Text (alternate text)
TABINDEX=Number (position in tabbing order)
ONFOCUS=Script (region received focus)
ONBLUR=Script (region lost focus) common attributes
OBJECT>lack of browser support </OBJECT>
Attr: DATA=URI (object data)
CLASSID=URI (location of implementation)
ARCHIVE=CDATA (archive files)
CODEBASE=URI (base URI for CLASSID, DATA, ARCHIVE)
WIDTH=Length (object width)
HEIGHT=Length (object height)
NAME=CDATA (name for form submission)
USEMAP=URI (client-side image map)
TYPE=ContentType (content-type of object)
CODETYPE=ContentType (content-type of code)
STANDBY=Text (message to show while loading)
TABINDEX=NUMBER (position in tabbing order)
DECLARE (do not instantiate object)
ALIGN=[ top | middle | bottom | left | right ] (object alignment) BORDER=Length (link border width)
HSPACE=Pixels (horizontal gutter)
VSPACE=Pixels (vertical gutter) common attributes
PARAM> Attr: NAME=CDATA (property name)
VALUE=CDATA (property value)
VALUETYPE=[ data | ref | object ] (type of value)
TYPE=ContentType (content-type of value resource) ID=ID
An OBJECT or APPLET may contain any number of PARAM elements prior to the alternate content that is also contained within the OBJECT or APPLET element
Q>for short, inline quotations</Q>
Attr: CITE=URI (source of quotation) common attributes
SPAN>...</SPAN> Attr: common attributes
SUB>...</SUB> Attr: common attributes
SUP>...</SUP>Attr: common attributes
Phrase Elements
All of them take common attributes
ABBR>non pronounceable short forms</ABBR>
ACRONYM TITLE="radio detecting and ranging"> radar</ACRONYM> pronounceable short forms
CITE>citations, such as titles of magazines or newspapers, ship names, references sources, quotation.</CITE>
CODE>denotes computer code</CODE>
DFN>defining instance of a term</DFN>
EM>text to be entered by the user</EM>
KBD>text to be entered by the user</KBD>
SAMP>sample output</SAMP>
STRONG>...</STRONG>
VAR>variables or program arguments</VAR>
FONT STYLE ELEMENTS