-
Notifications
You must be signed in to change notification settings - Fork 0
/
06-span,br,hr.div,entities.html
95 lines (86 loc) · 2.81 KB
/
06-span,br,hr.div,entities.html
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Elements Examples</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
.highlight {
color: red;
}
.custom-div {
background-color: #f2f2f2;
padding: 10px;
margin: 10px 0;
}
</style>
</head>
<body>
<h1>HTML Elements Examples</h1>
<p>
The following examples demonstrate the usage of various HTML elements and entities.
</p>
<h2><code><span></code> Element</h2>
<p>
The <code><span></code> element is an inline container used to apply styles or scripting to a specific section of text.
</p>
<p>
<span class="highlight">This text is highlighted using the span element.</span>
</p>
<h2><code><br></code> Element</h2>
<p>
The <code><br></code> element is used to insert a line break within text.
</p>
<p>
This is the first line.<br>This is the second line.
</p>
<h2><code><hr></code> Element</h2>
<p>
The <code><hr></code> element is used to represent a thematic break or separation within content.
</p>
<hr>
<p>
After the horizontal rule.
</p>
<h2><code><div></code> Element</h2>
<p>
The <code><div></code> element is a block-level container used to group other HTML elements and apply styles or scripting.
It is a versatile element that can be customized using the <code>style</code> attribute or by applying external CSS.
By default, it is a block-level element, meaning it starts on a new line and stretches the full width of its container.
</p>
<div class="custom-div">
This content is inside a div element with a light gray background.
</div>
<h2>HTML Entities</h2>
<p>
HTML entities are used to represent special characters and symbols.
</p>
<ul>
<li>< — Less than: <tag></li>
<li>> — Greater than: <tag></li>
<li>& — Ampersand: AT&T</li>
<li>“ ” — Double quotation marks: “Hello”</li>
<li>‘ ’ — Single quotation marks: It‘s a beautiful day</li>
<li>© — Copyright symbol: © 2023 My Company</li>
<li>® — Registered trademark symbol: Brand®</li>
<li>™ — Trademark symbol: Product™</li>
</ul>
<h2><code><style></code> Element</h2>
<p>
The <code><style></code> element is used to embed or define styles within an HTML document.
Styles can be applied to specific HTML elements or classes using CSS rules.
</p>
<style>
p {
color: blue;
}
</style>
<p>
This paragraph has a custom style applied using the <code><style></code> element.
</p>
</body>
</html>