Core tip: This "browser default HTML CSS style attribute" is useful when you need to restore the default values. At the beginning, apply the wildcard selector *{margin:0;padding:0; When you need to use margins, you need to restore the HTML default CSS values.
This "browser default HTML CSS style attribute" is useful when you need to restore the default values. At the beginning, apply the wildcard selector *{margin:0;padding:0; When you need to use margins, you need to restore the HTML default CSS values.
But the 52css.com selector in the construction of large web sites, affect performance, you can refer to the relevant articles, we still need to be cautious.
I've been looking for this document, and I happened to see it on W3 today. In addition to inline and block definitions, it is important to pay attention to the default styles (margin and font-size) of labels such as BODYH1~H6BLOCKQUOTEMENUULOLDD.
HTML, address, <br/>blockquote, <br/>body, DD, Div, <BR/>DL, DT, fieldset, form, <br/>frame, Fram ESET, <BR/>H1, H2, H3, H4, <br/>h5, H6, Noframes, <br/>ol, P, UL, center, <br/>dir, HR, menu, pre {Display:block} <br/>li {Display:list-item} <br/>head {Display:none} <br/>table {Display:tabl e} <br/>tr {Display:table-row} <br/>thead {Display:table-header-group} <br/>tbody {Display:tabl E-row-group} <br/>tfoot {Display:table-footer-group} <br/>col {Display:table-column} <br/>colgrou p {display:table-column-group} <br/>td, th {Display:table-cell;} <br/>caption {display:table-caption} <br/>th {Font-weight:bolder Text-align:center} <br/>caption {Text-align:center} <br/>body {Mar gin:8px; line-height:1.12} <br/>h1 {font-size:2em; margin:. 67em 0} <br/>h2 {font-size:1.5em; margin:. 75em 0} <BR/>H3 { Font-size:1.17em; margin:. 83em 0} <br/>h4, p, <br/>blockquote, UL, <br/>fieldset, form, <br/>ol, DL, dir, <br/& Gt;menu {margin:1.12em 0} <br/><br/>h5 {font-size:. 83em; margin:1.5em 0} <br/>h6 {font-size:. 75 Em Margin:1.67em 0} <br/>h1, H2, H3, H4, <br/>h5, h6, B, <br/>strong {font-weight:bolder} <br/>b lockquote {margin-left:40px margin-right:40px} <br/>i, cite, EM, <br/>var, address {font-style:italic} <br/>pre, TT, code, <BR/>KBD, Samp {font-family:monospace} <br/>pre {White-space:pre} <br/> button, textarea, <br/>input, object, <br/>select {display:inline-block;} <br/>big {font-size:1.17e M} <br/>small, Sub, sup {font-size:. 83em} <br/>sub {vertical-align:sub} <br/>sup {vertical-align : Super} <br/>table {border-spacing:2px} <br/>thead, Tbody, <br/>tfoot {vertical-align:middle} & Lt;br/>td, th {vertical-align:inherit} <br/>s, Strike, del {Text-decoration:line-through} <br/>hr {bo rder:1px inset} <br/>ol, ul, dir, <br/>menu, dd {margin-left:40px} <br/>ol {LIST-STYLE-TYPE:DECIM AL} <br/>ol UL, ul ol, <br/>ul UL, ol ol {margin-top:0; margin-bottom:0} <br/>u, ins {Text-decorat Ion:underline} <br/>br:before {content: "\a"} <br/>:before,: After {white-space:pre-line} <BR/>&L T;br/>center {Text-align:center} <BR/>ABBR, acronym {font-variant:small-caps; Letter-spacing:0.1em} <br />:link,: visited {text-decoration:underline} <br/>:focus {Outline:thin dotted invert} <BR/><BR/&G t;/* Begin bidirectionality settings (don't change) * * * <br/>bdo[dir= "ltr"] {direction:ltr; unicode-bidi:bidi-ove Rride} <br/>bdo[dir= "RTL"] {Direction:rtl unicode-bidi:bidi-override} <br/><br/>*[dir= "ltr"] {di rection:ltr; Unicode-bidi:embed} <br/>*[dir= "RTL"] {Direction:rtl unicode-bidi:embed} <br/><br/> @media Print {<br/> ; h1 {Page-break-before:always} <br/>h1, H2, H3, <br/>h4, H5, h6 {page-break-after:avoid} <br/>ul, OL, DL {page-break-before:avoid}