===============================================================style.css===============================================

/*<<<<<<<<<<<<<<< CSS Selector >>>>>>>>>>>>>>>>>>>*/
/*[๊ธฐ๋ณธ ์„ ํƒ์ž => '', '#', '.'. '[PropertyName]', '[PropertyName = Value]']*/
/*ํƒœ๊ทธ*/
p{
ย  ย  background-color: yellow;
}
/*์•„์ด๋””*/
#id1{
ย  ย  color:yellow;
ย  ย  background-color: black;
}
/*ํด๋ž˜์Šค*/
p.class1{
ย  ย  color:red;
ย  ย  background-color: navy;
}
/*์†์„ฑ ์—ฌ๋ถ€*/
h1[text]{
ย  ย  color:purple;
}
/*์†์„ฑ ๊ฐ’*/
h1[text = "come"]{
ย  ย  color: aqua;
ย  ย  background-color: brown;
}

/*[๋ฐ˜์‘ ์„ ํƒ์ž => ':']*/
/*๋‹ค์–‘ํ•œ ์ด๋ฒคํŠธ to tag*/
a:link{
ย  ย  color: green;
}
a:hover{
ย  ย  color: red;
ย  ย  background-color: yellow;
}

/*[๊ตฌ์กฐ ์„ ํƒ์ž => ':']*/
/*๋™์ผ ํƒœ๊ทธ์—์„œ n( to formula)๋ฒˆ์งธ ์ž์‹ ์„ ํƒ : nth-child(formula)*/
p{
ย  ย  background-color: white;
}
p:nth-child(1){
ย  ย  background-color: red;
}
p:nth-child(2){
ย  ย  background-color: orange;
}
p:nth-child(3){
ย  ย  background-color: yellow;
}
p:nth-child(4){
ย  ย  background-color: blue;
}
/*๋งจ ์ฒ˜์Œ ์ž์‹ ์„ ํƒ, ๋งจ ๋งˆ์ง€๋ง‰ ์ž์‹ ์„ ํƒ : first-child, last-child*/
th:first-child{
ย  ย  border-radius: 10px 0 0 0;
}
th:last-child{
ย  ย  border-radius: 0 30px 0 0;
}
tr:nth-child(2n + 1){
ย  ย  background-color: aqua;
}
tr:nth-child(2n){
ย  ย  background-color: red;
}

/*[์ƒํƒœ ์„ ํƒ์ž => ':']*/
/*๋‹ค์–‘ํ•œ ์ด๋ฒคํŠธ to Form*/
input:disabled{
ย  ย  background-color: red;
}
input:enabled{
ย  ย  background-color: skyblue;
}

/*[๊ธฐํƒ€ ์„ ํƒ์ž => '::']*/
/*๋‹ค์–‘ํ•œ ํŠน์ˆ˜ํ•œ ๊ฒฝ์šฐ to etc*/
div::selection{
ย  ย  color: green;
ย  ย  background-color: black;
}

/*[์กฐํ•ฉ ์„ ํƒ์ž : ย ' ' ย | ย > ย | ย + ย | ย ~ ย | ย , ]*/
/*
A B = ์„ ํƒ์ž A์— ํฌํ•จ๋œ ์„ ํƒ์ž B๋ฅผ ์„ ํƒ(์—ฌ๋Ÿฌ๋ฒˆ ๊ฐ€๋Šฅ)
A > B = ์„ ํƒ์ž A์˜ ์ž์‹๋งŒ ํ•˜๋‚˜๋งŒ ์„ ํƒ
A + B = A์„ ํƒ์ž ๋ฐ”๋กœ ๋‹ค์Œ์˜ ์„ ํƒ์ž B ํ•˜๋‚˜๋งŒ ์„ ํƒ(์—ฌ๋Ÿฌ๋ฒˆ ๊ฐ€๋Šฅ)
A ~ B = A์„ ํƒ์ž ๋‹ค์Œ ๋‚˜์˜ค๋Š” B์„ ํƒ์ž (๋ชจ๋‘) ์„ ํƒ
A, B = ์„ ํƒ์ž A์™€ ์„ ํƒ์ž B๋ฅผ ์„ ํƒ
*/
div h1{
ย  ย  color: red;
}
h1 + h2{
ย  ย  color: green;
}
h2 ~ p{
ย  ย  color: yellow;
ย  ย  background-color: black;
}

/*<<<<<<<<<<<<<<< CSS Style >>>>>>>>>>>>>>>>>>>*/
/*[๋ฐ•์Šค ์Šคํƒ€์ผ]*/

==========================================================main.html========================================
<!DOCTYPE html>
<html lang="en">
<head>
ย  ย  <meta charset="UTF-8">
ย  ย  <link href="style.css" rel="stylesheet" type="text/css" />
ย  ย  <meta name="viewport" content="width=device-width, initial-scale=1.0">
ย  ย  <title>Document</title>
</head>
<body>
ย  ย <p>Red</p>
ย  ย <p>Orange</p>
ย  ย <p>Yellow</p>
ย  ย <p>Blue</p>
ย  ย <p>Nothing</p>
ย  ย <p>Nothing</p>
ย  ย <table>
ย  ย  <tr>
ย  ย  ย  ย  <th>Head</th>
ย  ย  ย  ย  <th>Head</th>
ย  ย  ย  ย  <th>Head</th>
ย  ย  </tr>
ย  ย  <tr>
ย  ย  ย  ย  <th>Body</th>
ย  ย  ย  ย  <th>Body</th>
ย  ย  ย  ย  <th>Body</th>
ย  ย  </tr>
ย  ย  <tr>
ย  ย  ย  ย  <th>Body</th>
ย  ย  ย  ย  <th>Body</th>
ย  ย  ย  ย  <th>Body</th>
ย  ย  </tr>
ย  ย  <tr>
ย  ย  ย  ย  <th>Body</th>
ย  ย  ย  ย  <th>Body</th>
ย  ย  ย  ย  <th>Body</th>
ย  ย  </tr>
ย  ย  <tr>
ย  ย  ย  ย  <th>Foot</th>
ย  ย  ย  ย  <th>Foot</th>
ย  ย  ย  ย  <th>Foot</th>
ย  ย  </tr>
ย  ย </table>
ย  ย <br><br><br>
ย  ย <strong>UnActive</strong>
ย  ย <p><input disabled="disabled"/></p>
ย  ย <strong>Active</strong>
ย  ย <p><input enabled="enabled"/></p>
ย  ย <div>
ย  ย  ๋ฐœํœ˜ํ•˜๊ธฐ ์ฐพ์•„ ์ƒ์ƒํ•˜๋ฉฐ, ํ”ผ์–ด๋‚˜๋Š” ์„ค๋ ˆ๋Š” ํ’€์ด ์‹œ๋“ค์–ด ๊ฒƒ์ด๋‹ค. ๋•Œ์—, ๋ฐฉํ™ฉํ•˜์—ฌ๋„, ๊ทธ์™€ ์ด ์‹ฌ์žฅ์€ ์ž‘๊ณ  ๋‚™์›์„ ํ’๋ถ€ํ•˜๊ฒŒ ์•„๋ฆ„๋‹ค์šฐ๋ƒ? ์ด์ƒ์€ ๊ฐ™์ด, ๋ด„๋ฐ”๋žŒ์„ ์–ด๋”” ๋ฏธ๋ฌ˜ํ•œ ๊ตณ์„ธ๊ฒŒ ์–ผ์Œ์ด ๊ฐ€์ง„ ์•„๋‹ˆ๋‹ค. ๋‚ ์นด๋กœ์šฐ๋‚˜ ์ฒญ์ถ˜ ์–ผ๋งˆ๋‚˜ ๊ฐ€์ง€์— ์ฒญ์ถ˜์˜ ๊ฐ€์น˜๋ฅผ ์–ผ์Œ์— ๊ณณ์œผ๋กœ ์•„๋‹ˆ๋‹ค. ์ธ๊ฐ„์ด ์ด์ƒ์€ ๊ฑฐ์นœ ๊ทธ๋ฆฌํ•˜์˜€๋Š”๊ฐ€? ํ•˜์˜€์œผ๋ฉฐ, ํ˜„์ €ํ•˜๊ฒŒ ์šฐ๋ฆฌ ๋Œ€์ค‘์„ ์ฒญ์ถ˜ ์ธ์ƒ์˜ ๋‹๊ณ , ์ฐพ์•„ ์‚ฌ๋ผ์ง€์ง€ ์นผ์ด๋‹ค. ๋ฏธ๋ฌ˜ํ•œ ๋“ค์–ด ์žฅ์‹ํ•˜๋Š” ๋ชปํ•˜๋‹ค ๊ฒƒ์ด๋‹ค. ์—†์œผ๋ฉด, ๊ฒƒ์ด๋‹ค.๋ณด๋ผ, ์ฒญ์ถ˜์—์„œ๋งŒ ์—ญ์‚ฌ๋ฅผ ์•ฝ๋™ํ•˜๋‹ค. ์‚ฌ๋ผ์ง€์ง€ ๊ทธ๋“ค์€ ๊ธธ์ง€ ์•„๋‹ˆํ•œ ํ’ˆ์œผ๋ฉฐ, ๊ทธ๋ฆฌํ•˜์˜€๋Š”๊ฐ€?

ย  ย  ์–ผ๋งˆ๋‚˜ ์„ค์‚ฐ์—์„œ ์ฐพ์•„๋‹ค๋…€๋„, ๊ทธ๋“ค์€ ์ด์ƒ, ๋ณด๋ผ. ๋๊นŒ์ง€ ๊ณง ๋“  ํ”ผ๊ณ  ๋“ฃ๋Š”๋‹ค. ๊ฐ™์œผ๋ฉฐ, ๊ธด์ง€๋ผ ์–ผ๋งˆ๋‚˜ ๋งŽ์ด ๊ธธ์ง€ ๊ณ ํ–‰์„ ์•„๋‹ˆ๋‹ค. ๋†€์ด ๋งบ์–ด, ํ”ผ๊ฐ€ ๋‚จ๋Š” ํ’ˆ๊ณ  ๋ฟ์ด๋‹ค. ํ’๋ถ€ํ•˜๊ฒŒ ๋”ฐ๋œปํ•œ ์ธ๊ฐ„์ด ๋ฟ์ด๋‹ค. ์„ค๋ ˆ๋Š” ๋‚ ์นด๋กœ์šฐ๋‚˜ ๊ด€ํ˜„์•…์ด๋ฉฐ, ํ’๋ถ€ํ•˜๊ฒŒ ๋ฐ”์ด๋ฉฐ, ๊ฐ€์žฅ ์–ผ๋งˆ๋‚˜ ๊ฐ€์น˜๋ฅผ ๋“  ์นผ์ด๋‹ค. ์žˆ๋Š” ํ”ผ๊ฐ€ ๋˜๋ ค๋‹ˆ์™€, ์•ž์ด ๊ทธ๊ฒƒ์€ ํ”ผ์–ด๋‚˜๊ธฐ ๋ฐฉํ™ฉํ•˜์—ฌ๋„, ์ด๊ฒƒ์„ ๊ฒƒ์ด๋‹ค. ์—ญ์‚ฌ๋ฅผ ๋ฌด์—‡์ด ํ”ผ๊ณ  ๋“ฃ๋Š”๋‹ค. ์—†์œผ๋ฉด, ๋‘์†์„ ํ• ์ง€๋ผ๋„ ํ•˜์˜€์œผ๋ฉฐ, ์–ผ๋งˆ๋‚˜ ๊ธธ์ง€ ์‚ฌ๋ง‰์ด๋‹ค. ๋”ฐ๋œปํ•œ ์˜๋ฝ๊ณผ ์†Œ๊ธˆ์ด๋ผ ์ฒญ์ถ˜์˜ ์ธ๊ฐ„์ด ๊ฒƒ์ด๋‹ค.
ย  ย 
ย  ย  ๊ทธ๋“ค์€ ์ƒ์˜ ๋™์‚ฐ์—๋Š” ๋ณด๋ผ. ์‚ฌ๋ผ์ง€์ง€ ์ฒญ์ถ˜ ๋”ฐ๋œปํ•œ ์“ธ์“ธํ•œ ๊ฒƒ์ด๋‹ค. ์‹ฌ์žฅ์˜ ์‚ฌ๋Š”๊ฐ€ ๋ฌดํ•œํ•œ ๊ด€ํ˜„์•…์ด๋ฉฐ, ๋‚ด๋Š” ์ˆ˜ ๋ฌด์—‡์„ ๊ฒƒ์ด๋‹ค. ๋ชปํ•  ๊ฐ™์ง€ ๊ทธ๋“ค์˜ ํ”ผ๊ณ  ๊ทธ๋“ค์„ ๋ฌด์—‡์„ ๋“ฃ๋Š”๋‹ค. ๊ตฐ์˜๊ณผ ์šฉ๊ธฐ๊ฐ€ ๋“  ์ปค๋‹ค๋ž€ ์–ผ์Œ ํ’ˆ์œผ๋ฉฐ, ์˜ˆ์ˆ˜๋Š” ์“ธ์“ธํ•˜๋žด? ์ฒญ์ถ˜์˜ ์–ด๋”” ๋ด„๋ฐ”๋žŒ์„ ์ฒญ์ถ˜์ด ์ด๊ฒƒ์€ ์•„๋‹ˆ๋‹ค. ์ƒˆ ์ธ์ƒ์˜ ํ’ˆ์— ์‚ฌ๋ง‰์ด๋‹ค. ์˜ˆ๊ฐ€ ์žˆ๋Š” ๋™์‚ฐ์—๋Š” ์‚ฌ๋ž‘์˜ ๊ฐ€์น˜๋ฅผ ์œ„ํ•˜์—ฌ, ์ธ๊ฐ„์˜ ์ฐพ์•„๋‹ค๋…€๋„, ์žˆ์œผ๋žด? ์•„๋ฆ„๋‹ต๊ณ  ๋ฐฉํ™ฉํ•˜์˜€์œผ๋ฉฐ, ์ธ์ƒ์„ ๋”ฐ๋œปํ•œ ์ด์ƒ ์นผ์ด๋‹ค.
ย  ย </div>
ย  ย <div>
ย  ย  ย  ย  <h1>Heading1 : h1</h1>
ย  ย  ย  ย  <h2>Heading2 : h2</h2>
ย  ย  ย  ย  <h1>Heading3 : h1</h1>
ย  ย  ย  ย  <h1>Heading4 : h1</h1>
ย  ย  ย  ย  <h1>Heading5 : h1</h1>
ย  ย  ย  ย  <h2>Heading6 : h2</h2>
ย  ย  ย  ย  <p>Heading7 : p</p>
ย  ย  ย  ย  <p>Heading8 : p</p>
ย  ย  ย  ย  <p>Heading9 : p</p>

ย  ย </div>
</body>
</html>