Clear the browser's own style

Source: Internet
Author: User

HTML Default Style
HTML, Address,blockquote,body, DD, DIV,DL, DT, fieldset, Form,frame, FRAMESET,H1, H2, H3, H4,h5, H6, Noframes,ol, P, UL, C Enter,dir, HR, menu, pre {display:block}/* above list element default state next block display, not displayed will display inline elements, the list for the HTML4 version, some elements will be discarded in XHTML1 */
Li {display:list-item}/* is displayed as a list by default */
Head {Display:none}/* does not display by default */
Table {display:table}/* default to tabular display */
TR {Display:table-row}/* is displayed by default for table rows */
thead {Display:table-header-group}/* is grouped by default for table headers */
tbody {Display:table-row-group}/* is grouped by default for table rows */
tfoot {display:table-footer-group}/* default for group display at bottom of table */
Col {display:table-column}/* is displayed by default for table columns */
Colgroup {display:table-column-group}/* is displayed grouped by default for table columns */
TD, Th {Display:table-cell;} /* Default is cell display */
Caption {display:table-caption}/* is displayed by default for table headings */
th {font-weight:bolder; Text-align:center}/* is displayed by default for table headings, and is rendered in bold center state */
Caption {text-align:center}/* default to table title display, center state */
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}/* defines sub element default to subscript */
sup {vertical-align:super}/* definition sub element default to superscript display */
Table {border-spacing:2px;}
THEAD, Tbody, tfoot {vertical-align:middle}/* definition header, principal table, table foot element default to vertical alignment */
TD, Th {Vertical-align:inherit}/* define cells, column headings default to vertical to Zimmer think inherit */
S, strike, del {Text-decoration:line-through}/* define these elements default to strikethrough display */
HR {border:1px inset}/* defines the 1px width of the split line by default as a 3D concave edge effect */
OL, UL, dir, menu, dd {margin-left:40px}
OL {List-style-type:decimal}
OL UL, ul OL, UL UL, ol ol {margin-top:0; margin-bottom:0}
U, ins {text-decoration:underline}
Br:before {content: "A"}/* defines the pseudo-object content style of the wrapping element */
: Before,: After {white-space:pre-line}/* defines the default style for pseudo-object space characters */
Center {Text-align:center}
ABBR, acronym {font-variant:small-caps; Letter-spacing:0.1em}
: Link,: visited {text-decoration:underline}
: Focus {Outline:thin dotted invert}
/* Begin bidirectionality settings (don't change) */
Bdo[dir= "ltr"] {direction:ltr; unicode-bidi:bidi-override}/* define BDO element The default text read/write display order when its property is dir= "ltr" */
Bdo[dir= "RTL"] {Direction:rtl; unicode-bidi:bidi-override}/* define BDO element The default text read/write display order when its property is Dir= "RTL" */
*[dir= "ltr"] {direction:ltr; unicode-bidi:embed}/* defines any element when its property is dir= "ltr" The default text read/write display order */
*[dir= "RTL"] {Direction:rtl; unicode-bidi:embed}/* defines any element when its property is Dir= "RTL" the default text read/write display order */
@media Print {/* Define the default plot style for headings and lists */
h1 {Page-break-before:always}
H1, H2, H3, H4, H5, h6 {page-break-after:avoid}
UL, OL, DL {page-break-before:avoid}
}

Browser Default Style

1. Page margins
IE defaults to 10px, set by the body's margin property
FF defaults to 8px, via the body's Padding property setting
To clear the margins, be sure to clear both property values
Body {
margin:0;
padding:0;
}

2. Segment Spacing
IE defaults to 19px, set by the Margin-top property of P
The FF defaults to 1.12EM, which is set by the Margin-bottom property of P
P defaults to block display, to clear the segment spacing, you can generally set
p {
margin-top:0;
margin-bottom:0;
}

3. Heading styles
H1~h6 default bold display: Font-weight:bold;.
Default size please refer to the table above
And it's written like this.
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 16px, that is, the MEDIUM,H1~H6 element is displayed as bold by default in block display font,
To clear the heading style, you can generally set
HX {
Font-weight:normal;
Font-size:value;
}

4. List Style
ie default to 40px, through the margin properties of UL, OL set
FF default is 40px, through the UL, Ol padding property settings
The DL does not indent, but the internal description element dd is indented by default at 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 characters */
margin-left:0;/* Clear IE Left indent */
padding-left:0;/* clear non-ie left indent */
}

5. Center Element
ie default is text-align:center;
FF defaults to Margin-left:auto;margin-right:auto;

6. Hyperlink style
A style is underlined by default, the display color is blue, hyperlinks that have been visited become purple, to clear the link style, you can generally set
A
Text-decoration:none;
Color: #colorname;
}

7 Mouse Styles
ie default is Cursor:hand;
FF defaults to Cursor:pointer;. This statement is also valid in IE

8 Picture Link Style
ie default to purple 2px border line
FF default to blue 2px border line
To clear the picture link style, you can generally set
IMG {
border:0;vertical-align:top


}

Classification:

Clear the browser's own style

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.