-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlearn.html
More file actions
367 lines (326 loc) · 14.4 KB
/
learn.html
File metadata and controls
367 lines (326 loc) · 14.4 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!DOCTYPE html>
<html lang="en">
<head>
<!-- These are Meta Tags -->
<title>Learn HTML</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
nav li {
float: left;
}
nav li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
nav li a:hover {
background-color: #111;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 20px;
}
h1, h2, h3, h4 {
color: #393838;
}
p {
margin-bottom: 10px;
}
ul, ol {
margin-left: 20px;
}
code {
background-color: #f4f4f427;
padding: 2px 4px;
border-radius: 4px;
}
a {
color: #007bff;
text-decoration: none;
}
</style>
<body>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
<h1>Welcome to HTML 101</h1>
<p>This is a beginner's guide to HTML.</p>
<!-- Headings -->
<h2>What is HTML?</h2>
<p>HTML stands for HyperText Markup Language. It is the standard markup language</p>
<!-- Attributes -->
<h2>HTML Attributes</h2>
<p>HTML attributes provide additional information about an element. They are always specified in the
<a href="https://www.kephasitati.com" target="_blank">Visit kephasitati.com</a>
<p id="id Attribute"> <code><id></code> The attribute that assigns a unique identifier to an element.</p>
<p class="class Attribute"> <code><class></code> The attribute that assigns one or more class names to an element.</p>
<p style="color: blue;">This text is styled with inline CSS.</p>
<div><code><data-product-id="12345" data-price="25.99"></data-product-id></code>This is a product with data attributes.</div>
<!-- Semantic HTML -->
<h2>Semantic HTML</h2>
<section>
<h3>What is Semantic HTML?</h3>
<p>Semantic HTML refers to the use of HTML markup that conveys meaning about the content it contains.</p>
</section>
<p>Semantic HTML helps search engines and browsers understand the structure and meaning of web content. <br>
<br> It improves accessibility for users with disabilities and enhances the overall user experience.<br>
<br> Some examples include header, nav, article, footer</p>
<!-- Common Semantic Elements -->
<section>
<h3>Common Semantic Elements</h3>
<!-- ul is an Unordered list of tags-->
<ul>
<li><code><header></code></li>
<p>Header elements are used to define the header section of a document or a section.</p>
<li><code><nav></code></li>
<p>Navigation elements are used to define a set of navigation links.</p>
<li><code><article></code></li>
<p>Article elements are used to define independent, self-contained content.</p>
<li><code><footer></code></li>
<p>Footer elements are used to define the footer section of a document or a section.</p>
<li><code><section></code></li>
<p>Section elements are used to define a thematic grouping of content.</p>
<li><code><aside></code></li>
<p>Aside elements are used to define content that is tangentially related to the main content.</p>
<li><code><figure></code></li>
<p>Figure elements are used to encapsulate media content, such as images or diagrams, along with their captions.</p>
<li><code><figcaption></code></li>
<p>Figcaption elements are used to provide a caption for the content within a figure element.</p>
</ul>
</section>
<!-- Article -->
<article>
<h3>Benefits of Semantic HTML</h3>
<ul>
<li>Improved SEO</li>
<li>Better Accessibility</li>
<li>Enhanced User Experience</li>
</ul>
</article>
<!-- Aside -->
<aside>
<h3>Additional Resources</h3>
<p>For more information on <strong>Semantic HTML,</strong> check out the following resources:</p>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element" target="_blank">MDN Web Docs</a></li>
<li><a href="https://www.w3.org/TR/html52/" target="_blank">W3C HTML Specification</a></li>
</ul>
<p>Here is an image with a caption:</p>
<figure>
<img src="Image 1.jpeg" alt="The test image" width="500" height="200">
<figcaption>Trying out the figcaption tag</figcaption>
</figure>
</aside>
<!-- Comments -->
<p>Comments in HTML are written like this: <code><!-- This is a comment --></code></p>
<!-- Forms -->
<h2>Forms</h2>
<p><strong>NOTE:</strong> The <code>for</code> attribute of a label should match the <code>id</code></p>
<form action="/submit" method="post">
<label for="name">Username:</label>
<input type="text" id="name" name="name" placeholder="Enter your name" required>
<br>
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="example@domain.com" required>
<br>
<label for="age">Age:</label>
<input type="number" id="age" name="age" min="1" max="120" placeholder="Your Age" required>
<br>
<label for="checkbox">Terms of Service:</label>
<input type="checkbox" id="checkbox" name="checkbox" required>
<br>
<input type="submit" value="Submit">
</form>
<!-- HTML Validation -->
<h2>HTML Validation</h2>
<form action="/submit-form" method="post">
<label for="username">Username (4-8 characters):</label>
<input type="text" id="username" name="username" required minlength="4" maxlength="8" placeholder="Username">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required placeholder="example@domain.com">
<button type="submit">Submit</button>
</form>
<p><em>Validation ensures that users fill out forms in the correct format.</em></p>
<!-- Text Formatting-->
<h2>Text Formatting</h2>
<p>This is a <em>Italics</em> for HTML</p>
<p>This is a <strong>Bold</strong> for HTML</p>
<p>This is a <mark>Highlight</mark> for HTML</p>
<p>This is a <del>Cross</del> for HTML</p>
<p>This is a <ins>Underline</ins> for HTML</p>
<p>This is a <small>Small</small> for HTML</p>
<p>This is a <sub>Subscript</sub> for HTML</p>
<p>This is a <sup>Superscript</sup> for HTML</p>
<div>
<!-- Special Characters -->
<h2>Special Characters</h2>
<p>Some common special characters in HTML:</p>
<ul>
<li>& - Ampersand</li>
<li>< - Less than</li>
<li>> - Greater than</li>
<li>" - Double quote</li>
<li>' - Single quote</li>
<li> - Non-breaking space</li>
<li>© - Copyright</li>
<li>® - Registered trademark</li>
<li>€ - Euro sign</li>
<li>£ - British pound sign</li>
<li>¥ - Yen sign</li>
<li>¢ - Cent sign</li>
<li>§ - Section sign</li>
<li>° - Degree symbol</li>
<li>× - Multiplication sign</li>
<li>÷ - Division sign</li>
<li>… - Horizontal ellipsis</li>
<li>« - Left-pointing double angle quotation mark</li>
<li>» - Right-pointing double angle quotation mark</li>
<li>• - Bullet</li>
<li>′ - Prime symbol</li>
<li>″ - Double prime symbol</li>
<li>‹ - Left single angle quotation mark</li>
<li>› - Right single angle quotation mark</li>
<li>‾ - Overline</li>
<li>⁄ - Fraction slash</li>
<li>– - En dash</li>
<li>— - Em dash</li>
<li>‘ - Left single quotation mark</li>
<li>’ - Right single quotation mark</li>
<li>© - Copyright</li>
<!-- Sample Usage -->
<h4>Sample Usage</h4>
</div>
<p>I <strong>strongly</strong> recommend using <em>emphasis</em> tags like <strong>strong</strong> and <em>em</em> to highlight important text. Also, don't forget about <sub>subscript</sub> and <sup>superscript</sup> for details like H<sub>2</sub>O and E=mc<sup>2</sup>.</p>
<p>Special characters like &, <, >, and are essential for web development. Remember to use © or ® for copyright or registered symbols, respectively.</p>
<div>
<!-- Lists -->
<h2>Lists</h2>
<h3>Unordered List</h3>
<p>Unordered lists are used to create a bulleted list of items.</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<h3>Ordered List</h3>
<p>Ordered lists are used to create a numbered list of items.</p>
<ol>
<li>First Item</li>
<li>Second Item</li>
</ol>
<h3>Definition List</h3>
<p>Definition lists are used to define terms and their descriptions.</p>
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
<dt>JavaScript</dt>
<dd>A programming language for web development</dd>
</dl>
</div>
<!-- Simple Tables -->
<h2>Tables</h2>
<p>Tables are used to organize data in rows and columns.</p>
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
<p><em>Table with scope</em></p>
<table>
<tr>
<th scope="col">Month</th>
<th scope="col">Savings</th>
<th scope="col">Expenses</th>
</tr>
<tr>
<th scope="row">January</th>
<td>$100</td>
<td>$50</td>
</tr>
<th scope="row">February</th>
<td>$80</td>
<td>$40</td>
</tr>
<th scope="row">March</th>
<td>$120</td>
<td>$60</td>
</tr>
</table>
<!-- Merging Cells -->
<h2>Merging Cells</h2>
<p>To merge cells in a table, use the <code>colspan</code> and <code>rowspan</code> attributes.</p>
<table>
<caption>Details of People</caption>
<tr>
<th>Person</th>
<th colspan="2">Details</th>
</tr>
<tr>
<td>John Doe</td>
<td>Age: 30</td>
<td>Occupation: Developer</td>
</tr>
</table>
<!-- Links -->
<h2>Links</h2>
<p>Visit my website: <a href="https://www.kephasitati.com" target="_blank">Kepha Stati</a></p>
</div>
<h2>Multimedia</h2>
<nav>
<p>Listen to my favorite song:</p>
<p>Yemi Alade - Baddie</p>
<p>Click the play button to listen:</p>
<p>Note: The audio file is in MP3 format.</p>
<p>Supported formats include MP3, WAV, and OGG.</p>
<p>Ensure your browser supports the audio format.</p>
<p>Enjoy the music!</p>
<audio controls>
<source src="Yemi Alade Baddie_1080p [music].mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</nav>
<iframe width="560" height="315"
src="https://www.youtube.com/embed/tu2nUTbb6K8"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
<p><em>Navigation</em></p>
<nav>
<a href="#home">Home</a>, <a href="#about">About</a> , <a href="#contact">Contact</a></li>
</nav>
<!-- Footer -->
<footer>
<p>® <em>2025 Kepha Sitati. All rights reserved.</em></p>
</footer>
</body>
</html>