-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass41.html
More file actions
63 lines (56 loc) · 2.69 KB
/
class41.html
File metadata and controls
63 lines (56 loc) · 2.69 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
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Basic HTML Lists (Inline CSS)</title>
</head>
<body style="font-family: Arial, sans-serif; line-height:1.6; padding:20px;">
<!-- Unordered list (default vertical) -->
<h2 style="margin-bottom:6px;">Unordered List (vertical)</h2>
<ul style="list-style-type: square; color:#2b6cb0; font-size:16px; padding-left:20px;">
<li style="margin:6px 0;">Apples</li>
<li style="margin:6px 0;">Bananas</li>
<li style="margin:6px 0;">Cherries</li>
</ul>
<!-- Ordered list (vertical) -->
<h2 style="margin-top:18px; margin-bottom:6px;">Ordered List (vertical)</h2>
<ol style="list-style-type: upper-roman; color:#22543d; font-size:16px; padding-left:20px;">
<li style="margin:6px 0;">Wake up</li>
<li style="margin:6px 0;">Have breakfast</li>
<li style="margin:6px 0;">Start work</li>
</ol>
<!-- Unordered list displayed inline (horizontal) -->
<h2 style="margin-top:18px; margin-bottom:6px;">Unordered List (inline / horizontal)</h2>
<ul style="list-style:none; padding:0; margin:0;">
<li style="display:inline; margin-right:12px; font-weight:600;">Home</li>
<li style="display:inline; margin-right:12px; font-weight:600;">About</li>
<li style="display:inline; margin-right:12px; font-weight:600;">Contact</li>
</ul>
<!-- Ordered list displayed inline (horizontal) -->
<h2 style="margin-top:18px; margin-bottom:6px;">Ordered List (inline / horizontal)</h2>
<ol style="list-style:none; padding:0; margin:0; counter-reset:item;">
<li style="display:inline; margin-right:12px;">1. Step one</li>
<li style="display:inline; margin-right:12px;">2. Step two</li>
<li style="display:inline; margin-right:12px;">3. Step three</li>
</ol>
<!-- Example: nested lists with inline CSS -->
<h2 style="margin-top:18px; margin-bottom:6px;">Nested Lists</h2>
<ul style="list-style: disc; padding-left:20px;">
<li style="margin:6px 0;">Fruits
<ul style="list-style: circle; padding-left:18px; margin-top:6px;">
<li style="margin:4px 0;">Apple</li>
<li style="margin:4px 0;">Banana</li>
</ul>
</li>
<li style="margin:6px 0;">Vegetables
<ol style="list-style: lower-alpha; padding-left:18px; margin-top:6px;">
<li style="margin:4px 0;">Carrot</li>
<li style="margin:4px 0;">Peas</li>
</ol>
</li>
</ul>
<!-- Small tip -->
<p style="margin-top:18px; color:#555; font-size:14px;">Tip: Inline CSS is great for quick demos. For real projects, prefer external or internal CSS for maintainability.</p>
</body>
</html>