CSS
css 2. 선택자와 속성
a-nanas
2022. 3. 24. 17:44
스타일 태그 및 속성
1. 태그
<style>
a {
color : blue ;
}
</style>
2. 속성
<a href="0.html" style="color : red"> css </a>
선택자와 속성
<style>
a {
color : blue ;
text-decoration : none ;
}
</style>
선택자(selector)
: a
선언-효과(declaration)
1. 속성(property)
: color, text-decoration
2. 값(value)
: blue, none
선언-효과를 구분하는 역할
-> ;
css속성 알아내는 방법 ?
Googling!
ex. css font size property
h1 {
font-size : 45px ;
font-align : center ;
font-family : Palatino, Serif ;
}
serif : fallback font (앞 폰트가 안나올때를 대비한 대체재 폰트, 모든 브라우저에서 지원하는 폰트다.)
font-family : 폰트 스타일을 지정하는 속성이다.
** "Times New Roman"과 같이 폰트 이름에 띄어쓰기가 되어있으면 " "(쌍따옴표)를 사용해야 한다.