CSS2.1 User Agent Style Sheet Defaults
Notes: Values for IE8b are based on information from a post-Beta1 build so some values might be different as the feature has since been updated.
- Rows with Green backgrounds showing differences between implementations.
- Rows with Blue backgrounds showing consistency between current implementations.
- Rows with Light Grey backgrounds showing deprecated elements.
- Rows with Pink shows a row has been added (not in Appendix D).
- Cells with Red shows values that are under questioning.
- Cells with Orange shows values that have been admended (corrected from values provided by Microsoft).
Element | Property | Appendix D | IE7 | IE8 | FF2 | FF3 | Opera | Safari 3.1 | Final Styles |
---|---|---|---|---|---|---|---|---|---|
Address | display | block | block | block | block | block | block | block | block |
font-style | italic | italic | italic | italic | italic | italic | italic | italic | |
B | font-weight | bolder | 700 | bolder | 401 | 401 | 700 | bold | bolder |
Big | font-size | 1.17em | 13.55pt | 1.17em | larger - 18px | 18px | 18px | 19px | 1.17em |
Blockquote | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 14.25pt 30pt | 1em 40px | 1em 40px | 1em 40px | 1em 10px 1em 40px | 1em 40px | 1em 40px | |
margin-left | 40px | 30pt | 40px | 40px | 40px | 40px | 40px | 40px | |
margin-right | 40px | 30pt | 40px | 40px | 40px | 10px | 40px | 40px | |
Body | display | block | block | block | block | block | block | block | block |
margin | 8px | 15px 10px | 8px | 8px | 8px | 8px | 8px | 8px | |
BR | br:before | content: "\A" | undefined | content: "\A" | null | content: "\A" | content: "\A" | null | content: "\A" |
Button | display | inline-block | inline | inline-block | inline | inline | inline-block | inline-block | inline-block |
Caption | display | table-caption | block | table-caption | table-caption | table-caption | table-caption | table-caption | table-caption |
text-align | center | center | center | center | center | center | webkit-center | center | |
Center | display | block | block | block | block | block | block | block | block |
text-align | center | center | center | center | moz-center | center | webkit-center | center | |
Cite | font-style | italic | italic | italic | italic | italic | italic | italic | italic |
Element | Property | Appendix D | IE7 | IE8 | FF2 | FF3 | Opera | Safari 3.1 | Final Styles |
Code | font-family | monospace | Courier New | monospace | monospace | monospace | Courier new | webkit-monospace | monospace |
Col | display | table-column | block | table-column | table-column | table-column | table-column | table-column | table-column |
Colgroup | display | table-column-group | block | table-column-group | table-column-group | table-column-group | table-column-group | table-column-group | table-column-group |
DD | display | block | block | block | block | block | block | block | block |
margin-left | 40px | 30pt | 40px | 40px | 40px | 40px | 40px | 40px | |
Del | text-decoration | line-through | line-through | line-through | line-through | line-through | line-through | line-through | line-through |
DIR | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | auto auto auto 30pt | 1em 0 | 16px 0 | 16px 0 | 16px 0 | 16px 0 | 1em 0 | |
margin-left | 40px | 30pt | 0px | 0px | 0px | 40px | 0px | 40px | |
Div | display | block | block | block | block | block | block | block | block |
DL | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 14.25pt 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | |
page-break-inside | avoid | avoid | avoid | none | none | avoid | avoid | avoid | |
DT | display | block | block | block | block | block | block | block | block |
Em | font-style | italic | italic | italic | italic | italic | italic | italic | italic |
Fieldset | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 0 | 0 2px | 0 2px | 0 2px | 0 2px | 0 2px | 0 2px | |
Form | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 14.25pt 0 | 0 | 0 | 0 | 0 0 1em | 0 0 1em | 0 | |
Frame | display | block | block | block | block | block | block | block | block |
Frameset | display | block | block | block | block | block | block | block | block |
Element | Property | Appendix D | IE7 | IE8 | FF2 | FF3 | Opera | Safari 3.1 | Final Styles |
H1 | display | block | block | block | block | block | block | block | block |
font-size | 2em | 24pt | 2em | 32px | 32px | 32px | 32px | 2em | |
margin | 0.67em 0 | 14.25pt 0 | 0.67em 0 | 21.4667px 0 | 21.4333px 0 | 21px 0 | 21px 0 | 0.67em 0 | |
font-weight | bolder | 700 | bolder | bold | bold | 700 | bold | bolder | |
page-break-after | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
page-break-before | always | always | always | null | null | always | always | always | |
H2 | display | block | block | block | block | block | block | block | block |
font-size | 1.5em | 18pt | 1.5em | 24px | 24px | 24px | 24px | 1.5em | |
margin | 0.75em 0 | 14.25pt 0 | 0.83em 0 | 19.9333px 0 | 19.9167px 0 | 20px 0px | 19px 0 | 0.83em 0 | |
font-weight | bolder | 700 | bolder | bold | bold | 700 | bold | bolder | |
page-break-after | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
H3 | display | block | block | block | block | block | block | block | block |
font-size | 1.17em | 13.55pt | 1.17em | 18.7333px | 18.7167px | 18px | 19px | 1.17em | |
margin | 0.83em 0 | 14.25pt 0 | 1em 0 | 18.7333px 0 | 18.7167px 0 | 18px 0 | 18px 0 | 1em 0 | |
font-weight | bolder | 700 | bolder | bold | bold | 700 | bold | bolder | |
page-break-after | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
H4 | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 14.25pt 0 | 1.325em 0 | 21.2667px 0 | 21.2833px 0 | 16px 0 | 21px 0 | 1.325em 0 | |
font-weight | bolder | 700 | bolder | bold | bold | 700 | bold | bolder | |
page-break-after | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
H5 | display | block | block | block | block | block | block | block | block |
font-size | 0.83em | 10pt | 0.83em | 13.2667px | 13.2833px | 13px | 13px | 0.83em | |
margin | 1.5em 0 | 14.25pt 0 | 1.67em 0 | 22.1333px 0 | 22.1833px 0 | 21px 0 | 22px 0 | 1.67em 0 | |
font-weight | bolder | 700 | bolder | bold | bold | 700 | bold | bolder | |
page-break-after | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
H6 | display | block | block | block | block | block | block | block | block |
font-size | 0.75em | 7.55pt | 0.67em | 10.7333px | 10.7167px | 10px | 11px | 0.67em | |
margin | 1.67em 0 | 14.25pt 0 | 2.33em 0 | 25px 0 | 24.9667px 0 | 23px 0 | 24px 0 | 2.33em 0 | |
font-weight | bolder | 700 | bolder | bold | bold | 700 | bold | bolder | |
page-break-after | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
Element | Property | Appendix D | IE7 | IE8 | FF2 | FF3 | Opera | Safari 3.1 | Final Styles |
Head | display | none | inline | none | none | none | none | none | none |
HR | display | block | inline | block | block | block | block | block | block |
border | 1px inset | medium none | 1px inset | 1px -moz-bg-inset | 1px inset | 1px inset | 1px inset | 1px inset | |
margin | 0 auto | 0 auto | |||||||
HTML | display | block | inline | block | block | block | block | block | block |
I | font-style | italic | italic | italic | italic | italic | italic | italic | italic |
Input | display | inline-block | inline | inline-block | inline | inline | inline | inline-block | inline-block |
Ins | text-decoration | underline | underline | underline | underline | underline | underline | underline | underline |
KBD | font-family | monospace | Courier New | monospace | monospace | monospace | Courier new | webkit-monospace | monospace |
LI | display | list-item | block | list-item | list-item | list-item | list-item | list-item | list-item |
Menu | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 0 0 0 30pt | 1em 0 | 16px 0 | 16px 0 | 16px 0 | 16px 0 | 1em 0 | |
margin-left | 40px | 30pt | 0px | 0px | 0px | 40px | 0px | 40px | |
Noframes | display | block | block | block | block | block | block | block | block |
OL | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 14.25pt 0 14.25pt 30pt | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | |
margin-left | 40px | 30pt | 0px | 0 | 0 | 0 | 0 | 0 | |
padding-start | 40px | moz-padding-start: 40px | 40px | webkit-padding-start: 40px | |||||
list-style-type | decimal | undefined | decimal | decimal | decimal | decimal | decimal | decimal | |
page-break-inside | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
Element | Property | Appendix D | IE7 | IE8 | FF2 | FF3 | Opera | Safari 3.1 | Final Styles |
P | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 14.25pt 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | |
Pre | display | block | block | block | block | block | block | block | block |
font-family | monospace | Courier New | monospace | monospace | monospace | Courier new | webkit-monospace | monospace | |
margin | 14.25pt 0 | 1em 0 | 1em 0 | 1em 0 | |||||
white-space | pre | pre | pre | pre | pre | pre | pre | pre | |
S | text-decoration | line-through | line-through | line-through | line-through | line-through | line-through | line-through | line-through |
Samp | font-family | monospace | Courier New | monospace | monospace | monospace | Courier new | webkit-monospace | monospace |
Select | display | inline-block | inline | inline-block | inline | inline | inline | inline-block | inline-block |
Small | font-size | 0.83em | 10pt | 0.83em | 13px | 13px | 13px | 13px | 0.83em |
Strike | text-decoration | line-through | line-through | line-through | line-through | line-through | line-through | line-through | line-through |
Strong | font-weight | bolder | 700 | bolder | 401 | 401 | 700 | bold | bolder |
Sub | font-size | 0.83em | 10pt | 0.83em | 13px | 13px | 13px | 13px | 0.83em |
vertical-align | sub | auto | sub | sub | sub | sub | sub | sub | |
Sup | font-size | 0.83em | 10pt | 0.83em | 13px | 13px | 13px | 13px | 0.83em |
vertical-align | sup | auto | sup | sup | sup | sup | sup | sup | |
Table | display | table | block | table | table | table | table | table | table |
border-spacing | 2px | null | 2px | 2px | 2px | 2px | 2px | 2px | |
Tbody | display | table-row-group | block | table-row-group | table-row-group | table-row-group | table-row-group | table-row-group | table-row-group |
vertical-align | middle | auto | middle | middle | middle | baseline | middle | middle | |
TD | display | table-cell | block | table-cell | table-cell | table-cell | table-cell | table-cell | table-cell |
vertical-align | inherit | auto | inherit | inherit | inherit | inherit | inherit | inherit | |
Element | Property | Appendix D | IE7 | IE8 | FF2 | FF3 | Opera | Safari 3.1 | Final Styles |
Textarea | display | inline-block | inline | inline-block | inline | inline | inline | inline-block | inline-block |
Tfoot | display | table-footer-group | block | table-footer-group | table-footer-group | table-footer-group | table-footer-group | table-footer-group | table-footer-group |
vertical-align | middle | auto | middle | middle | middle | baseline | middle | middle | |
TH | display | table-cell | block | table-cell | table-cell | table-cell | table-cell | table-cell | table-cell |
font-weight | bolder | 700 | bolder | bold | bold | 700 | bold | bolder | |
text-align | center | center | center | center | center | center | center | center | |
vertical-align | inherit | auto | inherit | inherit | inherit | inherit | inherit | inherit | |
Thead | display | table-header-group | block | table-header-group | table-header-group | table-header-group | table-header-group | table-header-group | table-header-group |
vertical-align | middle | auto | middle | middle | middle | baseline | middle | middle | |
TR | display | table-row | block | table-row | table-row | table-row | table-row | table-row | table-row |
TT | font-family | monospace | Courier New | monospace | monospace | monospace | Courier new | webkit-monospace | monospace |
U | text-decoration | underline | underline | underline | underline | underline | underline | underline | underline |
UL | display | block | block | block | block | block | block | block | block |
margin | 1.12em 0 | 14.25pt 0 14.25pt 30pt | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | 1em 0 | |
margin-left | 40px | 30pt | 0px | ||||||
padding-start | 40px | moz-padding-start: 40px | 40px | webkit-padding-start: 40px | |||||
page-break-inside | avoid | avoid | avoid | null | null | avoid | avoid | avoid | |
Var | font-style | italic | italic | italic | italic | italic | italic | italic | italic |
Other sites showing CSS defaults.
- Internet Explorer User Agent Style Sheets from IE6 to IE9.
后记:
连续长时间工作,大脑短路,IE对脚本要求的真高。
当使用表单form元素时,即使设置高度、宽度、行高、字体大小、超出隐藏。在IE7下依然占据空间,设置外边距、内间距清0后依然无效,则浮动。实在不行还有定位。一定会让该元素离开它占用的空间。