CSS 설정하다보면 내가 의도하지 않은 속성이 적용된 것을 볼 수 있다.
그건 각 태그별로 브라우저에 디폴트로 설정된 속성과 값이 있기 때문이다.
가량 h1 태그의 경우, 아래 속성이 디폴트로 설정되어있다.
h1 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
CSS 작업을 할 때, 내가 의도하지 않은 결과가 나올 때에는 CSS Default Value를 확인해보자.
아래 사이트에서 확인할 수 있다.
https://www.w3schools.com/cssref/css_default_values.php
'개발자 도전기' 카테고리의 다른 글
[CSS] margin 값 넣는 방식 분류 (0) | 2023.01.29 |
---|---|
다양한 국적의 개발자가 모여서 할 수 있는 유익한 활동은? (feat. ChatGPT) (0) | 2023.01.28 |
공부일지 #8. HTML, CSS 기초 공부 (1) | 2023.01.26 |
[HTML]나만의 파비콘(Favicon) 간단히 만드는 방법 (feat. favicon.cc) (1) | 2023.01.26 |
[CSS] 기본 문법 (0) | 2023.01.26 |