The manual Page
Version française
   
index | glossary | news | downloads | links ]
  HTML
introduction
structure of
HTML pages

HTML tags
HTML attributes
text formatting
 
news
glossary
links
downloads
 
credits
contact
 
 
search
 
last update
19/02/2003
Valid HTML 4.0!
Valid CSS!
Hit-Parade
Mesurez votre audience


  The HTML 4 attributes

Here are all attributes that may be used within HTML tags.

This attribute is required means that this attribute is required with the given tags.

Deprecated attribute means that this attribute is deprecated, usually because the corresponding tags are also deprecated.

CDATA is a sequence of characters from the document character set and may include character entities.

Pixel is an integer that represents the number of pixels of the canvas (screen, paper).

Length may be either pixels or a percentage of the available horizontal or vertical space.

MultiLength may be a length or a relative length. A relative length has the form "i*", where "i" is an integer.

Datetime is a date/time represented with the legal format: YYYY-MM-DDThh:mm:ssTZD (see the complete type definition for Datetime).

FrameTarget is the name of a frame or one of these reserved words: _blank (new, unnamed window), _self (the current frame that contains referer), _parent (immediate FRAMESET parent of the current frame), _top (full, original window).

MediaDesc is a media descriptor. A list of recognized media descriptors: screen, tty, tv, projection, handheld, print, braille, aural. See http://www.w3.org/TR/html4/types.html#type-media-descriptors.

Longer descriptions for these types here: http://www.w3.org/TR/html4/types.html.

N.B.: the attribute bordercolor, often used with tables, has never been officially defined in HTML. It is actually an improvement from Microsoft and Netscape to change the color of tables' borders. To do this, you should use style sheets (see tables).

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

    name tags format/value comment
    abbr TD, TH text abbreviation for header cell
    accept-charset FORM charsets list of supported charsets
    accept FORM, INPUT content types list of MIME types for file upload
    accesskey A, AREA, BUTTON, INPUT, LABEL, LEGEND, TEXTAREA character accessibility key character
This attribute is required   action FORM URI server-side form handler
  Deprecated attribute align CAPTION top, bottom, left, right relative to table
  Deprecated attribute align APPLET, IFRAME, IMG, INPUT, OBJECT bottom, middle, top, left, right vertical or horizontal alignment
  Deprecated attribute align LEGEND top, bottom, left, right relative to fieldset
  Deprecated attribute align TABLE left, center, right table position relative to window
  Deprecated attribute align HR left, center, right horizontal alignment of the rule
  Deprecated attribute align DIV, H1, H2, H3, H4, H5, H6, P left, center, right, justify align, text alignment
    align COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR left, center, right, justify, char alignment of data and the justification of text in a cell
  Deprecated attribute alink BODY color color of selected links
  Deprecated attribute alt APPLET text short description
This attribute is required   alt AREA, IMG text short description
    alt INPUT CDATA short description
  Deprecated attribute archive APPLET CDATA comma-separated archive list
    archive OBJECT CDATA space-separated list of URIs
    axis TD, TH CDATA comma-separated list of related headers
  Deprecated attribute background BODY URI texture tile for document background
  Deprecated attribute bgcolor TABLE color background color for cells
  Deprecated attribute bgcolor TR color background color for row
  Deprecated attribute bgcolor TD, TH color cell background color
  Deprecated attribute bgcolor BODY color document background color
    border TABLE pixels frame width around table
  Deprecated attribute border IMG, OBJECT pixels link border width
    cellpadding TABLE length spacing within cells
    cellspacing TABLE length spacing between cells
    char COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR character alignment char, e.g. char=":"
    charoff COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR length offset for alignment char
    charset A, LINK, SCRIPT charset char encoding of linked resource
    checked INPUT no value for radio buttons and check boxes
    cite BLOCKQUOTE, Q URI URI for source document or msg
    cite DEL, INS URI info on reason for change
    class all elements but BASE, BASEFONT, HEAD, HTML, META, PARAM, SCRIPT, STYLE, TITLE CDATA space-separated list of classes
    classid OBJECT URI identifies an implementation
  Deprecated attribute clear BR left, all, right, none control of text flow. Default is none.
  Deprecated attribute code APPLET CDATA applet class file
    codebase OBJECT URI base URI for classid, data, archive
  Deprecated attribute codebase APPLET URI optional base URI for applet
    codetype OBJECT content type content type for code
  Deprecated attribute color BASEFONT, FONT color text color
    cols FRAMESET MultiLengths list of lengths, default: 100% (1 col)
This attribute is required   cols TEXTAREA number the visible width in average character widths
    colspan TD, TH number number of cols spanned by cell. Default is 1.
  Deprecated attribute compact DIR, DL, MENU, OL, UL no value reduced interitem spacing
This attribute is required   content META CDATA associated information
    coords AREA lengths comma-separated list of lengths
    coords A lengths for use with client-side image maps
    data OBJECT URI reference to object's data
    datetime DEL, INS Datetime date and time of change
    declare OBJECT no value declare but don't instantiate flag
    defer SCRIPT no value UA may defer execution of script
    dir all elements but APPLET, BASE, BASEFONT, BDO, BR, FRAME, FRAMESET, IFRAME, PARAM, SCRIPT ltr, rtl direction for weak/neutral text
This attribute is required   dir BDO ltr, rtl directionality
    disabled BUTTON, INPUT, OPTGROUP, OPTION, SELECT, TEXTAREA no value unavailable in this context
    enctype FORM content type the content type used to submit the form to the server. Default is "application/x-www-form-urlencoded".
  Deprecated attribute face BASEFONT, FONT CDATA comma-separated list of font names
    for LABEL ID matches field ID value
    frame TABLE void, above, below, hsides, lhs, rhs, vsides, box, border which parts of frame to render
    frameborder FRAME, IFRAME 1, 0 request frame borders? Default is 1.
    headers TD, TH IDs list of id's for header cells
    height IFRAME length frame height
  Deprecated attribute height TD, TH length height for cell
    height IMG, OBJECT length override height
This attribute is required Deprecated attribute height APPLET length initial height
    href A, AREA, LINK URI URI for linked resource
    href BASE URI URI that acts as base URI
    hreflang A, LINK language code language code
  Deprecated attribute hspace APPLET, IMG, OBJECT pixels horizontal gutter
    http-equiv META name HTTP response header name
    id all elements but BASE, HEAD, HTML, META, SCRIPT, STYLE, TITLE ID document-wide unique id
    ismap IMG, INPUT no value use server-side image map
    label OPTION text for use in hierarchical menus
This attribute is required   label OPTGROUP text for use in hierarchical menus
    lang all elements but APPLET, BASE, BASEFONT, BR, FRAME, FRAMESET, IFRAME, PARAM, SCRIPT language code language code
  Deprecated attribute language SCRIPT CDATA predefined script language name
  Deprecated attribute link BODY color color of links
    longdesc IMG URI link to long description (complements alt)
    longdesc FRAME, IFRAME URI link to long description (complements title)
    marginheight FRAME, IFRAME pixels margin height in pixels
    marginwidth FRAME, IFRAME pixels margin width in pixels
    maxlength INPUT number max chars for text fields
    media STYLE MediaDesc designed for use with these media
    media LINK MediaDesc for rendering on these media
    method FORM GET, POST HTTP method used to submit the form. Default is GET.
    multiple SELECT no value multiple selection or not in this SELECT. Default is single selection
    name BUTTON, TEXTAREA CDATA assigns the control name
  Deprecated attribute name APPLET CDATA allows applets to find each other
    name SELECT CDATA field name
    name FORM CDATA name of form for scripting
    name FRAME, IFRAME CDATA name of frame for targetting
    name IMG CDATA name of image for scripting
    name A CDATA named link end
    name INPUT, OBJECT CDATA submit as part of form
This attribute is required   name MAP CDATA for reference by usemap
This attribute is required   name PARAM CDATA property name
    name META name metainformation name
    nohref AREA no value this region has no action
    noresize FRAME no value allow users to resize frames?
  Deprecated attribute noshade HR no value the rule is rendered in a solid color rather than as the traditional two-color "groove"
  Deprecated attribute nowrap TD, TH no value suppress word wrap
  Deprecated attribute object APPLET CDATA serialized applet file
    onblur A, AREA, BUTTON, INPUT, LABEL, SELECT, TEXTAREA script data the element lost the focus
    onchange INPUT, SELECT, TEXTAREA script data the element value was changed
    onclick all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a pointer button was clicked
    ondblclick all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a pointer button was double clicked
    onfocus A, AREA, BUTTON, INPUT, LABEL, SELECT, TEXTAREA script data the element got the focus
    onkeydown all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a key was pressed down
    onkeypress all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a key was pressed and released
    onkeyup all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a key was released
    onload FRAMESET script data all the frames have been loaded
    onload BODY script data the document has been loaded
    onmousedown all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a pointer button was pressed down
    onmousemove all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a pointer was moved within
    onmouseout all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a pointer was moved away
    onmouseover all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a pointer was moved onto
    onmouseup all elements but APPLET, BASE, BASEFONT, BDO, BR, FONT, FRAME, FRAMESET, HEAD, HTML, IFRAME, ISINDEX, META, PARAM, SCRIPT, STYLE, TITLE script data a pointer button was released
    onreset FORM script data the form was reset
    onselect INPUT, TEXTAREA script data some text was selected
    onsubmit FORM script data the form was submitted
    onunload FRAMESET script data all the frames have been removed
    onunload BODY script data the document has been removed
    profile HEAD URI named dictionary of meta info
  Deprecated attribute prompt ISINDEX text prompt message
    readonly TEXTAREA no value prohibits changes to the control
    readonly INPUT no value for text and passwd
    rel A, LINK link types forward link types
    rev A, LINK link types reverse link types
    rows FRAMESET MultiLengths list of lengths, default: 100% (1 row)
This attribute is required   rows TEXTAREA number  
    rowspan TD, TH number number of rows spanned by cell. Default is 1.
    rules TABLE none, groups, rows, cols, all rulings between rows and cols. Default is none.
    scheme META CDATA select form of content
    scope TD, TH row, col, rowgroup, colgroup scope covered by header cells
    scrolling FRAME, IFRAME yes, no, auto scrollbar or none. Default is auto.
    selected OPTION no value  
    shape AREA rect, circle, poly, default controls interpretation of coords. Default is rect.
    shape A rect, circle, poly, default for use with client-side image maps. Default is rect.
  Deprecated attribute size HR pixels height of the rule
  Deprecated attribute size FONT [+|-]nn (e.g. size="+1", size="4") font size
    size INPUT CDATA width of the control. In pixels except for text and password (number of characters).
This attribute is required Deprecated attribute size BASEFONT CDATA base font size for FONT elements
    size SELECT number rows visible
    span COL number COL attributes affect N columns. Default is 1.
    span COLGROUP number default number of columns in group. Default is 1.
    src SCRIPT URI URI for an external script
    src INPUT URI for fields with images
    src FRAME, IFRAME URI source of frame content
This attribute is required   src IMG URI URI of image to embed
    standby OBJECT text message to show while loading
  Deprecated attribute start OL number starting sequence number
    style all elements but BASE, BASEFONT, HEAD, HTML, META, PARAM, SCRIPT, STYLE, TITLE style sheet associated style info
    summary TABLE text purpose/structure for speech output
    tabindex A, AREA, BUTTON, INPUT, OBJECT, SELECT, TEXTAREA number position in tabbing order
    target A, AREA, BASE, FORM, LINK FrameTarget render in this frame
  Deprecated attribute text BODY color document text color
    title all elements but BASE, BASEFONT, HEAD, HTML, META, PARAM, SCRIPT, TITLE text advisory title
    type A, LINK content type advisory content type
    type OBJECT content type content type for data
    type PARAM content type content type for value when valuetype=ref
This attribute is required   type SCRIPT content type content type of script language
This attribute is required   type STYLE content type content type of style language
    type INPUT text, password, checkbox, radio, submit, reset, file, hidden, image, button what kind of widget is needed. Default is text.
  Deprecated attribute type LI disc, square, circle (for UL), 1, A, a, I, i (for OL) list item style
  Deprecated attribute type OL 1, A, a, I, i numbering style
  Deprecated attribute type UL disc, square, circle bullet style
    type BUTTON button, submit, reset for use as form button. Default is submit.
    usemap IMG, INPUT, OBJECT URI use client-side image map
    valign COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR top, middle, bottom, baseline vertical alignment in cells
    value INPUT CDATA Specify for radio buttons and checkboxes
    value OPTION CDATA defaults to element content
    value PARAM CDATA property value
    value BUTTON CDATA sent to server when submitted
  Deprecated attribute value LI number reset sequence number
    valuetype PARAM data, ref, object how to interpret value. Default is data.
  Deprecated attribute version HTML CDATA the HTML version used for this document
  Deprecated attribute vlink BODY color color of visited links
  Deprecated attribute vspace APPLET, IMG, OBJECT pixels vertical gutter
  Deprecated attribute width HR length  
    width IFRAME length frame width
    width IMG, OBJECT length override width
    width TABLE length table width
  Deprecated attribute width TD, TH length width for cell
This attribute is required Deprecated attribute width APPLET length initial width
    width COL MultiLength column width specification
    width COLGROUP MultiLength default width for enclosed COLs
  Deprecated attribute width PRE number suggested width in number of characters for the rendering of the PRE block

References

printable format printable format



Copyright © 2000-2002 themanualpage.org - This site is submissive to the terms of the GNU GPL and FDL licences.