-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
530 lines (503 loc) · 21.1 KB
/
index.html
File metadata and controls
530 lines (503 loc) · 21.1 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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Language Demonstration</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #333;
}
.container {
background: rgba(255, 255, 255, 0.95);
padding: 30px;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
backdrop-filter: blur(10px);
}
h1 {
color: #2c3e50;
text-align: center;
font-size: 2.5em;
margin-bottom: 30px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
h2 {
color: #34495e;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
margin-top: 30px;
}
.demo-section {
background: #f8f9fa;
padding: 20px;
margin: 20px 0;
border-radius: 10px;
border-left: 5px solid #3498db;
}
.highlight {
background: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
padding: 2px 6px;
border-radius: 4px;
font-weight: bold;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
th, td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
font-weight: bold;
}
tr:hover {
background-color: #f5f5f5;
}
.form-section {
background: #e8f4fd;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
}
input, textarea, select {
width: 100%;
padding: 10px;
margin: 5px 0;
border: 2px solid #ddd;
border-radius: 5px;
font-size: 16px;
transition: border-color 0.3s;
}
input:focus, textarea:focus, select:focus {
outline: none;
border-color: #3498db;
}
button {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 12px 25px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: transform 0.3s, box-shadow 0.3s;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.media-section {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin: 20px 0;
}
.media-item {
background: white;
padding: 15px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.interactive-demo {
background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
padding: 20px;
border-radius: 10px;
margin: 20px 0;
}
.color-box {
width: 50px;
height: 50px;
display: inline-block;
margin: 5px;
border-radius: 5px;
cursor: pointer;
transition: transform 0.3s;
}
.color-box:hover {
transform: scale(1.1);
}
.semantic-section {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
margin: 20px 0;
}
.semantic-item {
background: white;
padding: 15px;
border-radius: 8px;
border: 2px solid #e74c3c;
transition: all 0.3s;
}
.semantic-item:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
nav ul {
list-style: none;
padding: 0;
display: flex;
justify-content: center;
background: #34495e;
border-radius: 10px;
overflow: hidden;
}
nav ul li {
margin: 0;
}
nav ul li a {
display: block;
padding: 15px 25px;
color: white;
text-decoration: none;
transition: background 0.3s;
}
nav ul li a:hover {
background: #3498db;
}
.animation-demo {
width: 100px;
height: 100px;
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
border-radius: 50%;
margin: 20px auto;
animation: bounce 2s infinite;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
40% { transform: translateY(-30px); }
60% { transform: translateY(-15px); }
}
.tooltip {
position: relative;
display: inline-block;
cursor: pointer;
}
.tooltip .tooltiptext {
visibility: hidden;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 10px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>🌐 HTML Language Demonstration</h1>
<nav>
<ul>
<li><a href="#basics">Basics</a></li>
<li><a href="#text">Text</a></li>
<li><a href="#forms">Forms</a></li>
<li><a href="#media">Media</a></li>
<li><a href="#semantic">Semantic</a></li>
</ul>
</nav>
</header>
<main>
<section id="basics" class="demo-section">
<h2>📋 HTML Basics</h2>
<p>HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure of a web page using <span class="highlight">elements</span> and <span class="highlight">tags</span>.</p>
<h3>Document Structure</h3>
<pre style="background: #2c3e50; color: #ecf0f1; padding: 15px; border-radius: 5px; overflow-x: auto;">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Title</title>
</head>
<body>
<h1>Hello World!</h1>
<p>This is a paragraph.</p>
</body>
</html></pre>
</section>
<section id="text" class="demo-section">
<h2>📝 Text Elements</h2>
<h3>Headings (h1-h6)</h3>
<h1 style="font-size: 2em; margin: 10px 0;">Heading 1</h1>
<h2 style="font-size: 1.5em; margin: 10px 0;">Heading 2</h2>
<h3 style="font-size: 1.17em; margin: 10px 0;">Heading 3</h3>
<h4 style="font-size: 1em; margin: 10px 0;">Heading 4</h4>
<h5 style="font-size: 0.83em; margin: 10px 0;">Heading 5</h5>
<h6 style="font-size: 0.67em; margin: 10px 0;">Heading 6</h6>
<h3>Text Formatting</h3>
<p>This is <strong>bold text</strong> and this is <em>italic text</em>.</p>
<p>This is <mark>highlighted text</mark> and this is <del>deleted text</del>.</p>
<p>This is <sub>subscript</sub> and this is <sup>superscript</sup>.</p>
<p>This is <code>inline code</code> and this is a <kbd>keyboard input</kbd>.</p>
<blockquote style="border-left: 4px solid #3498db; padding-left: 20px; margin: 20px 0; font-style: italic;">
"The best way to predict the future is to create it." - Peter Drucker
</blockquote>
<h3>Lists</h3>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px;">
<div>
<h4>Unordered List</h4>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
</div>
<div>
<h4>Ordered List</h4>
<ol>
<li>Plan</li>
<li>Design</li>
<li>Develop</li>
</ol>
</div>
</div>
<h4>Definition List</h4>
<dl>
<dt><strong>HTML</strong></dt>
<dd>HyperText Markup Language</dd>
<dt><strong>CSS</strong></dt>
<dd>Cascading Style Sheets</dd>
</dl>
</section>
<section id="forms" class="form-section">
<h2>📋 Form Elements</h2>
<form onsubmit="event.preventDefault(); alert('Form submitted!');">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px;">
<div>
<label for="name">Full Name:</label>
<input type="text" id="name" name="name" placeholder="Enter your name" required>
</div>
<div>
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="Enter your email" required>
</div>
</div>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px;">
<div>
<label for="age">Age:</label>
<input type="number" id="age" name="age" min="1" max="120" placeholder="Enter your age">
</div>
<div>
<label for="country">Country:</label>
<select id="country" name="country">
<option value="">Select a country</option>
<option value="us">United States</option>
<option value="uk">United Kingdom</option>
<option value="ca">Canada</option>
<option value="au">Australia</option>
</select>
</div>
</div>
<div style="margin-top: 15px;">
<label for="bio">Biography:</label>
<textarea id="bio" name="bio" rows="4" placeholder="Tell us about yourself..."></textarea>
</div>
<div style="margin-top: 15px;">
<label>Interests:</label><br>
<input type="checkbox" id="web" name="interests" value="web">
<label for="web">Web Development</label><br>
<input type="checkbox" id="design" name="interests" value="design">
<label for="design">Design</label><br>
<input type="checkbox" id="programming" name="interests" value="programming">
<label for="programming">Programming</label>
</div>
<div style="margin-top: 15px;">
<label>Experience Level:</label><br>
<input type="radio" id="beginner" name="experience" value="beginner">
<label for="beginner">Beginner</label><br>
<input type="radio" id="intermediate" name="experience" value="intermediate">
<label for="intermediate">Intermediate</label><br>
<input type="radio" id="advanced" name="experience" value="advanced">
<label for="advanced">Advanced</label>
</div>
<div style="margin-top: 20px;">
<button type="submit">Submit Form</button>
<button type="reset" style="margin-left: 10px; background: #e74c3c;">Reset Form</button>
</div>
</form>
</section>
<section id="media" class="demo-section">
<h2>🎬 Media Elements</h2>
<div class="media-section">
<div class="media-item">
<h3>Images</h3>
<div style="width: 100%; height: 150px; background: linear-gradient(45deg, #ff6b6b, #4ecdc4); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
Sample Image Placeholder
</div>
<p><small>Images enhance visual appeal and convey information quickly.</small></p>
</div>
<div class="media-item">
<h3>Video</h3>
<div style="width: 100%; height: 150px; background: linear-gradient(45deg, #667eea, #764ba2); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
📹 Video Placeholder
</div>
<p><small>Videos provide dynamic content and engagement.</small></p>
</div>
<div class="media-item">
<h3>Audio</h3>
<div style="width: 100%; height: 150px; background: linear-gradient(45deg, #ffeaa7, #fab1a0); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
🎵 Audio Placeholder
</div>
<p><small>Audio elements add sound and music to web pages.</small></p>
</div>
</div>
</section>
<section class="demo-section">
<h2>📊 Tables</h2>
<table>
<thead>
<tr>
<th>Element</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><h1></td>
<td>Main heading</td>
<td>Page title</td>
</tr>
<tr>
<td><p></td>
<td>Paragraph</td>
<td>Text content</td>
</tr>
<tr>
<td><a></td>
<td>Anchor/Link</td>
<td>Navigation</td>
</tr>
<tr>
<td><img></td>
<td>Image</td>
<td>Visual content</td>
</tr>
</tbody>
</table>
</section>
<section id="semantic" class="demo-section">
<h2>🏗️ Semantic HTML5 Elements</h2>
<div class="semantic-section">
<div class="semantic-item">
<h4><header></h4>
<p>Represents introductory content or navigation</p>
</div>
<div class="semantic-item">
<h4><nav></h4>
<p>Contains navigation links</p>
</div>
<div class="semantic-item">
<h4><main></h4>
<p>Main content of the document</p>
</div>
<div class="semantic-item">
<h4><article></h4>
<p>Self-contained, independently distributable content</p>
</div>
<div class="semantic-item">
<h4><section></h4>
<p>Thematic grouping of content</p>
</div>
<div class="semantic-item">
<h4><aside></h4>
<p>Content aside from main content</p>
</div>
<div class="semantic-item">
<h4><footer></h4>
<p>Footer information</p>
</div>
<div class="semantic-item">
<h4><figure></h4>
<p>Self-contained content like images</p>
</div>
</div>
</section>
<section class="interactive-demo">
<h2>🎮 Interactive Elements</h2>
<p>Click the colored boxes to see JavaScript interaction:</p>
<div style="text-align: center; margin: 20px 0;">
<div class="color-box" style="background: #e74c3c;" onclick="changeBackground('#e74c3c')"></div>
<div class="color-box" style="background: #3498db;" onclick="changeBackground('#3498db')"></div>
<div class="color-box" style="background: #2ecc71;" onclick="changeBackground('#2ecc71')"></div>
<div class="color-box" style="background: #f39c12;" onclick="changeBackground('#f39c12')"></div>
<div class="color-box" style="background: #9b59b6;" onclick="changeBackground('#9b59b6')"></div>
</div>
<div class="animation-demo"></div>
<div style="text-align: center; margin: 20px 0;">
<div class="tooltip">Hover over me
<span class="tooltiptext">This is a tooltip!</span>
</div>
</div>
</section>
<section class="demo-section">
<h2>🔗 Links and Navigation</h2>
<p>HTML provides various ways to create links:</p>
<ul>
<li><a href="#basics">Internal link to section</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML" target="_blank">External link (opens in new tab)</a></li>
<li><a href="mailto:example@email.com">Email link</a></li>
<li><a href="tel:+1234567890">Phone link</a></li>
</ul>
</section>
</main>
<footer style="text-align: center; margin-top: 40px; padding: 20px; border-top: 2px solid #3498db;">
<p>© 2025 HTML Language Demonstration. Built with semantic HTML5, CSS3, and JavaScript.</p>
<p><small>This demonstrates the power and versatility of HTML for creating structured, accessible web content.</small></p>
</footer>
</div>
<script>
function changeBackground(color) {
document.body.style.background = `linear-gradient(135deg, ${color} 0%, #764ba2 100%)`;
// Add a fun animation
const colorBox = event.target;
colorBox.style.transform = 'scale(1.2) rotate(360deg)';
setTimeout(() => {
colorBox.style.transform = 'scale(1) rotate(0deg)';
}, 300);
}
// Add smooth scrolling for navigation links
document.querySelectorAll('nav a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
// Add a welcome message
setTimeout(() => {
console.log('Welcome to the HTML Language Demonstration!');
console.log('This page showcases various HTML elements and their capabilities.');
}, 1000);
</script>
</body>
</html>