HTML tags have default styles in the browser, for example, the p tag has top and bottom margins, the strong tag has a bold font style, etc. There are differences between the default styles of different browsers. For example, ul has an indentation style by default. Under IE, its indentation is implemented by margin, but under Firefox it is implemented by padding.
CSS reset is a very popular solution now, which is to overwrite all the browser's default styles from the beginning. The browser's default styles during development may cause us multi-browser compatibility problems, affecting Development efficiency.
Part of the CSS reset content is as follows
html {color:#000;background:#FFF;}t5 body,div,dl,dt,dd,ul,ol,li, h1,h2,h3,h4,h5,h6, pre,code,form,fieldset,legend, input,textarea,p,blockquote,th,td{margin:0;padding:0;} table {border-collapse:collapse;border-spacing:0;} fieldset,img {border:0;} address,caption,cite,code,dfn,em,strong,th,var {font-style:normal;font-weight:normal;} li {list-style:none;} caption,th {text-align:left;} h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;} q:before,q:after {content:'';} abbr,acronym {border:0;font-variant:normal;} sup {vertical-align:text-top;} sub {vertical-align:text-bottom;} input,textarea,select {font-family:inherit;font-size:inherit;font-weight:inherit;} input,textarea,select {*font-size:100%;} legend {color:#000;}
Related recommendations: "CSS Tutorial"
The above is the detailed content of What does css reset mean?. For more information, please follow other related articles on the PHP Chinese website!