-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchapter15.html
More file actions
52 lines (47 loc) Β· 1.81 KB
/
chapter15.html
File metadata and controls
52 lines (47 loc) Β· 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Chapter 15: CSS Colors</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h2 class="chapter-header" id="heading">Chapter 15: CSS COLORS</h2>
<div class="tag-section">
<h3>Color Names</h3>
<div class="tag-demo">
<p style="color: red;">This text is Red.</p>
<p style="color: green;">This text is Green.</p>
<p style="color: blue;">This text is Blue.</p>
<p style="background-color: yellow;">This text has Yellow background.</p>
</div>
</div>
<div class="tag-section">
<h3>HEX Colors</h3>
<div class="tag-demo">
<p style="color: #ff0000;">This text uses HEX (#ff0000 β Red).</p>
<p style="color: #00ff00;">This text uses HEX (#00ff00 β Green).</p>
<p style="color: #0000ff;">This text uses HEX (#0000ff β Blue).</p>
<p style="background-color: #ff0;">This background uses short HEX (#ff0 β Yellow).</p>
</div>
</div>
<div class="tag-section">
<h3>RGB Colors</h3>
<div class="tag-demo">
<p style="color: rgb(255, 0, 0);">This text uses RGB(255, 0, 0) β Red.</p>
<p style="color: rgb(0, 255, 0);">This text uses RGB(0, 255, 0) β Green.</p>
<p style="color: rgb(0, 0, 255);">This text uses RGB(0, 0, 255) β Blue.</p>
<p style="color: rgba(255, 0, 0, 0.5);">This text uses RGBA(255, 0, 0, 0.5) β Semi-Transparent Red.</p>
</div>
</div>
<div class="tag-section">
<h3>Grey Colors</h3>
<div class="tag-demo">
<p style="color: #000;">This is Black (#000).</p>
<p style="color: #666;">This is Dark Grey (#666).</p>
<p style="color: #aaa;">This is Light Grey (#aaa).</p>
<p style="color: #fff; background:black;">This is White (#fff) on Black background.</p>
</div>
</div>
</body>
</html>