Programming Languages/HTML, CSS
reset CSS
YUYA
2020. 12. 10. 21:33
Reset CSS
브라우저의 역할
HTML 언어를 번역해서 유저에게 보여준다.
대표적인 브라우저로 IE, Firefox, Chrome, Safari, Opera가 있다.
그런데, 브라우저들은 보여주기 방식에 있어서 서로 다른 기본값을 사용하고 있다
예를 들어, margin 이나 padding을 적용했을 때 브라우저마다 보이는 방식이 다름
RESET 개념의 도입
모든 브라우저에서 통일 된 화면을 볼 수 있도록, 기본값을 초기화 시킴
RESET 코드
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: "";
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
input:focus {
outline: none;
}
a {
color: inherit;
text-decoration: none;
}