Extensible HyperText Markup Language

CSS Reference

This reference is based on the CSS 2.1 specification. To better understand how Web browsers use CSS to render markup, please refer to the Box Model article.

"Must know" list

margin, padding, border, background-color, color, font-family, font-size, float

Complete list

azimuth
Used to give the impression that a sound is coming from a specific horizontal direction.
background
Shorthand for setting background-color, background-image, background-repeat, background-attachment and background-position.
background-attachment
Specifies whether background images should scroll or be fixed in a browser window.
background-color
Specifies the background color of an element.
background-image
Specifies the background image of an element.
background-position
Specifies the initial position of a background image.
background-repeat
Specifies whether the image is repeated (tiled), and how.
border
Shorthand for setting border-width, border-style and border-color for all four borders.
border-bottom
Shorthand for setting border-bottom-width, border-bottom-style and border-bottom-color.
border-bottom-color
Specifies the color of the element's bottom border.
border-bottom-style
Specifies the line style of an element's bottom border.
border-bottom-width
Specifies the width of the element's bottom border.
border-collapse
Specifies if table cells should have a their own border or share a common border.
border-color
Specifies the color of the element's four borders.
border-left
Shorthand for setting border-left-width, border-left-style and border-left-color.
border-left-color
Specifies the color of the element's left border.
border-left-style
Specifies the line style of an element's left border.
border-left-width
Specifies the width of the element's left border.
border-right
Shorthand for setting border-right-width, border-right-style and border-right-color.
border-right-color
Specifies the color of the element's right border.
border-right-style
Specifies the line style of an element's right border.
border-right-width
Specifies the width of the element's right border.
border-spacing
Specifies the distance between table cells.
border-style
Specifies the line style of the element's four borders.
border-top
Shorthand for setting border-top-width, border-top-style and border-top-color.
border-top-color
Specifies the color of the element's top border.
border-top-style
Specifies the line style of an element's top border.
border-top-width
Specifies the width of the element's top border.
border-width
Specifies the width of the element's four borders.
bottom
Used in conjunction with position property to position elements outside the normal flow.
caption-side
Specifies if the table caption should render above or below the table.
clear
Used to stop elements from wrapping around a floating element.
clip
Specifies the area of the element that should be rendered.
color
Specifies the foreground color of an element's text content.
content
Used to insert content before or after an element.
counter-increment
Used to increment the count for the counters defined by the functions counter() and counters() of the content property.
counter-reset
Used to set the count to a specific value for the counters defined by the functions counter() and counters() of the content property.
cue
Shorthand for setting cue-before and cue-after.
cue-after
Used play a sound after an element in order to delimit it.
cue-before
Used play a sound before an element in order to delimit it.
cursor
Specifies the type of cursor to be displayed for the pointing device.
direction
Specifies the writing direction of text (left-to-right or right-to-left).
display
Overrides the default layout behavior of an element.
elevation
Used to give the impression that a sound is coming from a specific vertical direction.
empty-cells
Specifies if empty cells should be visible.
float
Used to float an element left or right.
font
Shorthand for setting font-style, font-variant, font-weight, font-size, line-height and font-family.
font-family
Specifies a prioritized list of fonts used to render text.
font-size
Specifies size of the font.
font-style
Used to slant the font such as making it italic.
font-variant
Specifies if the font should render in small capital letters.
font-weight
Specifies the the weight of the font.
height
Specifies the height of the rectangle rendered for the element.
left
Used in conjunction with position property to position elements outside the normal flow.
letter-spacing
Specifies the distance between characters
line-height
Used to change the spacing between lines of text.
list-style
Shorthand for setting list-style-type, list-style-position and/or list-style-image.
list-style-image
Sets the image that will be used as the list item marker.
list-style-position
Specifies if the list marker (bullet, number, image, etc.) should be rendered inside or outside the rectangle created by the list item.
list-style-type
Specifies the style of the list item marker.
margin
Shorthand for setting margin-top, margin-right, margin-bottom and/or margin-left.
margin-bottom
Specifies the width between the element's bottom border and the element's outer edge.
margin-left
Specifies the width between the element's left border and the element's outer edge.
margin-right
Specifies the width between the element's right border and the element's outer.
margin-top
Specifies the width between the element's top border and the element's outer edge.
max-height
Specifies the maximum height of the element.
max-width
Specifies the maximum width of the element.
min-height
Specifies the minimum height of the element.
min-width
Specifies the minimum width of the element.
orphans
Specifies the minimum number of lines of a paragraph that must be left at the bottom of a page when a Web page is printed.
outline
Shorthand method for setting outline-width, outline-style and outline-color.
outline-color
Specifies the line color of the element's outline.
outline-style
Specifies the line style of the element's outline.
outline-width
Specifies the line width of the element's outline.
overflow
Specifies whether content of a block-level element is clipped when it is larger than the parent element.
padding
Shorthand method for setting padding-top, padding-right, padding-bottom and/or padding-left.
padding-bottom
Specifies the width between the element's content and the bottom border.
padding-left
Specifies the width between the element's content and the left border.
padding-right
Specifies the width between the element's content and the right border.
padding-top
Specifies the width between the element's content and the top border.
page-break-after
Specifies page break behavior after the element when printing a Web page.
page-break-before
Specifies page break behavior before the element when printing a Web page.
page-break-inside
Specifies page break behavior inside an element when printing a Web page.
pause
Shorthand for setting pause-before and pause-after.
pause-after
Used to specify a pause after speaking an element's content.
pause-before
Used to specify a pause before speaking an element's content.
pitch
Specifies the average pitch (a frequency) of the speaking voice.
pitch-range
Specifies variation in average pitch.
play-during
Specifies a sound to be played as a background while an element's content is spoken.
position
Specifies the type of scheme used to position elements on a Web page.
quotes
Specifies pairs of quotation marks for each level of embedded quotation.
richness
Specifies the richness, or brightness, of the speaking voice.
right
Used in conjunction with position property to position elements outside the normal flow.
speak
Used to enable or disable speech processing of text or to specify to specify text to be spelled out one letter at a time.
speak-header
Specifies whether table headers are spoken before every cell.
speak-numeral
Controls how numerals are spoken.
speak-punctuation
Specifies how punctuation is spoken.
speech-rate
Specifies the speaking rate.
stress
Controls the amount of inflection that results from stress markers.
table-layout
Specifies how the width of table columns is calculated.
text-align
Specifies alignment of inline content (text and images) for block elements.
text-decoration
Specifies the decorative effects that can be applied to text.
text-indent
Specifies the indentation of the first line of text.
text-transform
Controls capitalization effects on text.
top
Used in conjunction with position property to position elements outside the normal flow.
unicode-bidi
Influences how bi-directional text is rendered.
vertical-align
Specifies the vertical positioning of content inside inline elements and table cells.
visibility
Specifies whether the element is visible.
voice-family
Prioritized list of voice family names.
volume
Used to set the average volume of sound.
white-space
Specifies how whitespace (spaces, tabs and hard returns) inside the element is handled.
widows
Specifies the minimum number of lines of a paragraph that must be left at the top of a page when a Web page is printed.
width
Specifies the width of the rectangle rendered for the element.
word-spacing
Specifies the distance between words.
z-index
Specifies the order in which elements overlap each other when they need to be rendered in the same space.

Copyright

Portions of this document are copyrighted by:

  • Copyright © 2002-2006 xhtml.com
  • Copyright © 2004 W3C