QUICK LINKS


Color HEX Codes

Special characters


EXAMPLES

Physical Styles

Logical Styles

Internal Style Sheet-Headings




HOME

BACK--HTML Attributes

Style Sheets


Font Family
Font Style
Font Variant
Font Weight
Font Size
Word Spacing
Letter Spacing
Text Decoration
Vertical Alignment
Text Transformation
Text Alignment
Text Indent
Line Height
Background Color
Background Image
Background Repeat
Background Attachment
Background Position
Width
Height
Clear
Whitespace
Top Padding
Right Padding
Bottom Padding
Left Padding
Padding
Top Margin
Right Margin
Bottom Margin
Left Margin
Margin
Float
Color
Border Color
Top Border Width
Right Border Width
Left Border Width
Bottom Border Width
Border Width
Border Style
List Style Type
List Style Image
List Style Position

Font Family

Syntax: font-family: family-name

Possible Values:
Any font family name may be used, specific or generic.

serif (e.g., Times)
sans-serif (e.g., Arial or Helvetica)
cursive (e.g., Zapf-Chancery)
fantasy (e.g., Western)
monospace (e.g., Courier)

Initial Value: Determined by browser

Applies to: All elements

Inherited: Yes

Font Style

Syntax: font-style: value

Possible Values: normal | italic | oblique

Initial Value: normal

Applies to: All elements

Inherited: Yes

Font Variant

Syntax: font-variant: value

Possible Values: normal | small-caps

Initial Value: normal

Applies to: All elements

Inherited: Yes

Font Weight

Syntax: font-weight: value

Possible Values: normal | bold | bolder | lighter | 100 - 900|

Initial Value: normal

Applies to: All elements

Inherited: Yes

Font Size

Syntax: font-size: absolute-size | relative-size | length | percentage

Possible Values:

absolute-size
xx-small | x-small | small | medium | large | x-large | xx-large

relative-size
larger | smaller

length

percentage (in relation to parent element)

Initial Value: medium

Applies to: All elements

Inherited: Yes

Word Spacing

Syntax: word-spacing: value

Possible Values: normal | length

Initial Value: normal

Applies to: All elements

Inherited: Yes

Letter Spacing

Syntax: letter-spacing: value

Possible Values: normal | length

Initial Value: normal

Applies to: All elements

Inherited: Yes

Text Decoration

Syntax: text-decoration: value

Possible Values: none | underline | overline | line-through | blink

Initial Value: none

Applies to: All elements

Inherited: No

Vertical Alignment

Syntax: vertical-align: value

Possible Values: baseline | sub | super | top | text-top
| middle | bottom | text-bottom | percentage

Initial Value: baseline

Applies to: Inline elements

Inherited: No

Text Transformation

Syntax: text-transform: value

Possible Values: none | capitalize | uppercase | lowercase

Initial Value: none

Applies to: All elements

Inherited: Yes

Text Alignment

Syntax: text-align: value

Possible Values: left | right | center | justify

Initial Value: Determined by browser

Applies to: Block-level elements

Inherited: Yes

Text Indentation

Syntax: text-indent: value

Possible Values: length | percentage

Initial Value: 0

Applies to: Block-level elements

Inherited: Yes

Line Height

Syntax: line-height: value

Possible Values: normal | number | length | percentage

Initial Value: normal

Applies to: All elements

Inherited: Yes

Color

Syntax: color: color

Possible values: Hexadecimal Color Codes

Initial Value: Determined by browser

Applies to: All elements

Inherited: Yes

Background Color

Syntax: background-color: value

Possible Values: color | transparent

Initial Value: transparent

Applies to: All elements

Inherited: No

Background Image

Syntax: background-image: value

Possible Values: url | none

Initial Value: none

Applies to: All elements

Inherited: No

Background Repeat

Syntax: background-repeat: value

Possible Values: repeat | repeat-x | repeat-y | no-repeat

Initial Value: repeat

Applies to: All elements

Inherited: No

Background Attachment

Syntax: background-attachment: value

Possible Values: scroll | fixed

Initial Value: scroll

Applies to: All elements

Inherited: No

Background Position

Syntax: background-position: value

Possible Values: percentage | length(1,2) | top | center | bottom |left | center | right

Initial Value: 0% 0%

Applies to: Block-level and replaced elements

Inherited: No

Top Margin

Syntax: margin-top: value

Possible Values: length | percentage | auto

Initial Value: 0

Applies to: All elements

Inherited: No

Right Margin

Syntax: margin-right: value

Possible Values: length | percentage | auto

Initial Value: 0

Applies to: All elements

Inherited: No

Bottom Margin

Syntax: margin-bottom: value

Possible Values: length | percentage | auto

Initial Value: 0

Applies to: All elements

Inherited: No

Left Margin

Syntax: margin-left: value

Possible Values: length | percentage | auto

Initial Value: 0

Applies to: All elements

Inherited: No

Margin

Syntax: margin: value

Possible Values: [ length | percentage | auto ]{1,4}

Initial Value: Not defined

Applies to: All elements

Inherited: No

Top Padding

Syntax: padding-top: value

Possible Values: length | percentage

Initial Value: 0

Applies to: All elements

Inherited: No

Right Padding

Syntax: padding-right: value Possible Values: length | percentage

Initial Value: 0

Applies to: All elements

Inherited: No

Bottom Padding

Syntax: padding-bottom: value

Possible Values: length | percentage

Initial Value: 0

Applies to: All elements

Inherited: No

Left Padding

Syntax: padding-left: value

Possible Values: length | percentage

Initial Value: 0

Applies to: All elements

Inherited: No

Padding

Syntax: padding: value

Possible Values: [ length | percentage ]{1,4}

Initial Value: 0

Applies to: All elements

Inherited: No

Top Border Width

Syntax: border-top-width: value

Possible Values: thin | medium | thick | length

Initial Value: medium

Applies to: All elements

Inherited: No

Right Border Width

Syntax: border-right-width: value

Possible Values: thin | medium | thick | length

Initial Value: medium

Applies to: All elements

Inherited: No

Bottom Border Width

Syntax: border-bottom-width: value

Possible Values: thin | medium | thick | length

Initial Value: medium

Applies to: All elements

Inherited: No

Left Border Width

Syntax: border-left-width: value

Possible Values: thin | medium | thick | length

Initial Value: medium

Applies to: All elements

Inherited: No

Border Width

Syntax: border-width: value

Possible Values: [ thin | medium | thick | length ]{1,4}

Initial Value: Not defined

Applies to: All elements

Inherited: No

Border Color

Syntax: border-color: value

Possible Values: color{1,4}

Initial Value: The value of the color property

Applies to: All elements

Inherited: No

Border Style

Syntax: border-style: value

Possible Values: [ none | dotted | dashed | solid | double | groove | ridge | inset | outset ]{1,4}

Initial Value: none

Applies to: All elements

Inherited: No

Width

Syntax: width: value

Possible Values: length | percentage | auto

Initial Value: auto

Applies to: Block-level and replaced elements

Inherited: No

Height

Syntax: height: value

Possible Values: length | auto

Initial Value: auto

Applies to: Block-level and replaced elements

Inherited: No

Float

Syntax: float: value

Possible Values: left | right | none

Initial Value: none

Applies to: All elements Inherited: No

Clear

Syntax: clear: value

Possible Values: none | left | right | both

Initial Value: none

Applies to: All elements

Inherited: No

Whitespace

Syntax: white-space: value

Possible Values: normal | pre | nowrap

Initial Value: normal

Applies to: All elements

Inherited: Yes

List Style Type

Syntax: list-style-type: value

Possible Values: disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none

Initial Value: disc

Applies to: Elements with display value list-item

Inherited: Yes

List Style Image

Syntax: list-style-image: value

Possible Values: url | none

Initial Value: none

Applies to: Elements with display value list-item

Inherited: Yes

List Style Position

Syntax: list-style-position: value

Possible Values: inside | outside

Initial Value: outside

Applies to: Elements with display value list-item

Inherited: Yes

Refernce: Web Design Group-CSS Properties


Top of Page