HTML Elements and Attributes

advertisement
HTML Elements and Attributes
(NOT A COMPLETE LIST)
Not supported in xhtml (deprecated)
<element attribute = “value” attribute = “value”> content </element> (2-sided tags) or
<element attribute = “value” attribute = “value” /> (1-sided / empty elements)
element
attributes
value
can be
applied to
almost all
elements
class (used with styles)
id
style (used for inline styles)
title
text
text
list of styles (See: Styles and Values.doc)
text
Elements Found In All Web Pages
!doctype
html
head
title
body
meta
many deprecated attributes for this element
author | description | keywords | generator | revised
| others
text
content-type | content-style-type | expires | setcookie | others
name
content
http-equiv
List Of Other Elements And Their Attributes.
a
address
area
blockquote
br
div
h1, h2, h3, h4,
h5, h6
hr
img
link (used for
external
stylesheet)
map
p
script
span
style
sub
sup
title
a character
path name to file
_self (this is the default)
_blank
any text
alt
coords
href
nohref
shape
any text
list of coordinates separated by commas
path name to file
nohref
circle | poly | rect
id (used with styles)
align
text containing NO spaces (used to name tag)
left | right | center (should use css)
color
noshade
size
width
alt
width
height
src
usemap
href
rel
type
id
name (still used with id attr. for older browsers)
#hhhhhh where 0 <= h <= f
noshade
number
number or percentage (include %)
any text
# of pixels
# of pixels
path name to image file
#text
path name to stylesheet
stylesheet
text/css
text containing no spaces (used to give a name)
text containing no spaces (used to give a name)
for a client-side scripting language
style (used for inline styles)
type (used for internal styles)
list of styles (See Styles and Values.doc)
text/css
accesskey
href
target
HTML Elements and Attributes
(NOT A COMPLETE LIST)
Not supported in xhtml (deprecated)
<element attribute = “value” attribute = “value”> content </element> (2-sided tags) or
<element attribute = “value” attribute = “value” /> (1-sided / empty elements)
element
attributes
value
Lists
ul
ol
li
dl
dt
dd
Table
table
caption
td
th
tr
number
# of pixels
# of pixels
above|below|border|box|hsides|lhs|rhs|void|vsides
all|cols|groups|none|rows
description for visually impaired
# of pixels or percentage (use % for percentage)
left | right | top | bottom
left | right | center | justify
top | middle | bottom | baseline
number
number
left | right | center | justify
top | middle | bottom | baseline
number
number
left | right | center | justify
top | middle | bottom | baseline
border
cellpadding
cellspacing
frame (for outside borders)
rules (for inside borders)
summary
width
align
align
valign
colspan
rowspan
align
valign
colspan
rowspan
align
valign
Form
form
input
select
option
(contained in
select tag)
textarea
action (required)
accept (optional)
enctype (optional)
checked
maxlength
name
size
value
disabled
readonly
name
size
value
selected
specifies where to send the form-data once submitted
specifies file types that server accepts
specifies how form-data should be encoded
(used with method=”post”)
get | post
text containing NO spaces (used to name the form)
button | checkbox | file | hidden | image | password |
radio | reset | submit | text
checked
number
text containing NO spaces (used to assign a name)
number
(assigns a value)
disabled
readonly
text containing NO spaces (used to assign a name)
number (specifies number of visible options)
(assigns a value)
selected (sets default selection)
cols
rows
name
wrap
number (specifies width)
number (specifies number of lines)
text containing NO spaces (used to assign a name)
soft | hard
method (optional)
id (optional)
type
Download