Summary of default values of HTML Tag CSS attributes
This is useful when you need to restore the default value.
* {Margin: 0; padding: 0;} at the beginning. When margins are required, the default html css value needs to be restored.
I have been searching for this document all the time. I saw it on w3. In addition to the definition of inline and block, the main thing is to pay attention to the body | H1 ~ H6 | BLOCKQUOTE | menu | ul | ol | default style (margin and font-size) of the DD and other labels ).
HTML, address,
BLOCKQUOTE,
Body, DD, Div,
DL, DT, fieldset, form,
Frame, frameset,
H1, H2, H3, H4,
H5, H6, noframes,
OL, P, UL, center,
Dir, HR, menu, pre {display: block}
Li {display: List-item}
Head {display: None}
Table {display: Table}
Tr {display: Table-row}
Thead {display: Table-header-group}
Tbody {display: Table-row-group}
Tfoot {display: Table-footer-group}
Col {display: Table-column}
Colgroup {display: Table-column-group}
TD, Th {display: Table-cell ;}
Caption {display: Table-caption}
Th {font-weight: bolder; text-align: Center}
Caption {text-align: Center}
Body {margin: 8px; line-Height: 1.12}
H1 {font-size: 2em; margin:. 67em 0}
H2 {font-size: 1.5em; margin:. 75em 0}
H3 {font-size: 1.17em; margin:. 83em 0}
H4, P,
BLOCKQUOTE, UL,
Fieldset, form,
OL, DL, Dir,
Menu {margin: 1.12em 0}
H5 {font-size:. 83em; margin: 1.5em 0}
H6 {font-size:. 75em; margin: 1.67em 0}
H1, H2, H3, H4,
H5, H6, B,
Strong {font-weight: bolder}
BLOCKQUOTE {margin-left: 40px; margin-Right: 40px}
I, cite, em,
VaR, address {font-style: italic}
PRE, TT, code,
KBD, SAMP {font-family: monospace}
Pre {white-space: Pre}
Button, textarea,
Input, object,
Select {display: inline-block ;}
Big {font-size: 1.17em}
Small, sub, sup {font-size:. 83em}
Sub {vertical-align: Sub}
Sup {vertical-align: Super}
Table {border-Spacing: 2px ;}
Thead, tbody,
Tfoot {vertical-align: middle}
TD, Th {vertical-align: Inherit}
S, strike, del {text-Decoration: Line-through}
HR {border: 1px inset}
OL, UL, Dir,
Menu, DD {margin-left: 40px}
Ol {list-style-type: decimal}
Ol ul, UL ol,
Ul ul, Ol {margin-top: 0; margin-bottom: 0}
U, INS {text-Decoration: underline}
BR: Before {content: "\ "}
: Before,: After {white-space: Pre-line}
Center {text-align: Center}
Abbr, acronym {font-variant: Small-caps; letter-Spacing: 0.1em}
: Link,: visited {text-Decoration: underline}
: Focus {outline: thin dotted invert}
BDO [dir = "LTR"] {direction: LTR; Unicode-bidi: Bidi-Override}
BDO [dir = "RTL"] {direction: RTL; Unicode-bidi: Bidi-Override}
* [Dir = "LTR"] {direction: LTR; Unicode-bidi: Embed}
* [Dir = "RTL"] {direction: RTL; Unicode-bidi: Embed}
@ Media Print {
H1 {page-break-before: Always}
H1, H2, H3,
H4, H5, H6 {page-break-after: Avoid}
Ul, ol, DL {page-break-before: Avoid
--------------------------------------------------------------------------------
Default browser Style
1. Margins
The default IE value is 10px, Which is set through the margin attribute of the body.
FF is 8px by default and is set through the padding attribute of the body.
To clear the margins, you must clear these two property values.
Body {
Margin: 0;
Padding: 0;
}
2. segment spacing
The default IE value is 19px, Which is set through the margin-top attribute of P.
FF is 1.12em by default. It is set through the margin-bottom attribute of P.
P is displayed in blocks by default. To clear the segment spacing, You can generally set
P {
Margin-top: 0;
Margin-bottom: 0;
}
3. Title Style
H1 ~ H6 bold display by default: font-weight: bold ;.
The default size is shown in the table above.
This is also the case.
H1 {font-size: XX-large ;}
H2 {font-size: X-large ;}
H3 {font-size: Large ;}
H4 {font-size: Medium ;}
H5 {font-size: small ;}
H6 {font-size: X-small ;}
The default font size of a large browser is 16 PX, which is equal to medium, H1 ~ By default, H6 elements are displayed in bold in bulk font,
To clear the title style, you can generally set
HX {
Font-weight: normal;
Font-size: value;
}
4. List Style
The default IE value is 40px, Which is set through the margin attribute of UL and ol.
FF is 40px by default. It is set through the padding attribute of UL and ol.
DL is not indented, but the description element dd is Indented by default by 40px, while the name element dt is not indented.
To clear the list style, you can generally set
Ul, ol, DD {
List-style-type: none;/* clear list style operator */
Margin-left: 0;/* clear ie left indent */
Padding-left: 0;/* clear non-ie left indent */
}
5. element center
IE is text-align: center by default;
FF is margin-left: auto by default; margin-Right: auto;
6. hyperlink Style
Style a is underlined by default, and the display color is blue. The accessed hyperlink becomes purple. To clear the link style, you can set it in general.
A {
Text-Decoration: none;
Color: # colorname;
}
7. Mouse Style
IE is cursor: hand by default;
FF is cursor: pointer by default ;. This statement is also valid in IE.
8. Image link Style
The default Internet Explorer is a border line of 2 PX.
The default value of FF is the border line of blue 2px.
To clear the image link style, you can generally set
IMG {
Border: 0;
}