-
Notifications
You must be signed in to change notification settings - Fork 0
/
html.html
3897 lines (3769 loc) · 127 KB
/
html.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
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
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<!-- ad sense tag-->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1733919132650092"
crossorigin="anonymous"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FBJL1SB5QM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-FBJL1SB5QM");
</script>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="title" content="Coding-nation" />
<meta name="description"
content="CodingNation is a comprehensive code tutorial website, providing beginner to advanced coding tutorials, coding exercises, and coding challenges to help you learn to code and build your skills." />
<meta name="keywords"
content="Coding-nation, CodeNation, HTML tutorials, python tutorials, css tutorials, c tutorials,React js tutorials, javascript tutorials,java tutorials, php tutorials, code editor, online code editor, Codebot,chatbot,quizzes" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="English" />
<meta name="author" content="coding-nation.com" />
<link rel="icon" type="image/png" sizes="32x32" href="../images/favicon.png" />
<!-- Latest compiled and minified CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" />
<!-- Latest compiled JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" rel="stylesheet" />
<link rel="stylesheet" href="../Styles/Notes.css" />
<script>
function changeTitle(newTitle) {
document.title = newTitle;
}
</script>
<title>HTML Course | coding-nation</title>
</head>
<body>
<!--for whole page-->
<div class="contain">
<!--navigation bar-->
<header class="fixed-navbar">
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="../index.html">CodingNation</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto" id="navbarNavLinks">
<li class="nav-item">
<a class="nav-link" href="../index.html">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">Courses</a>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" href="../Python.html">Python</a>
</li>
<li>
<a class="dropdown-item" href="../React.html">React JS</a>
</li>
<li>
<a class="dropdown-item" href="../html.html">HTML</a>
</li>
<li><a class="dropdown-item" href="../css.html">CSS</a></li>
<li>
<a class="dropdown-item" href="../jascri.html">JavaScript</a>
</li>
<li><a class="dropdown-item" href="../cpro.html">C</a></li>
<li>
<a class="dropdown-item" href="../java.html">Java</a>
</li>
<li><a class="dropdown-item" href="../php.html">PHP</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">Practice</a>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" href="../HTMLQuiz.html" target="_blank">HTML
Quiz</a>
</li>
<li>
<a class="dropdown-item" href="../CSSQuiz.html" target="_blank">CSS
Quiz</a>
</li>
<li>
<a class="dropdown-item" href="../JSQuiz.html" target="_blank">JavaScript
Quiz</a>
</li>
<li>
<a class="dropdown-item" href="../CQuiz.html" target="_blank">C Quiz</a>
</li>
<li>
<a class="dropdown-item" href="../JAVAQuiz.html" target="_blank">Java
Quiz</a>
</li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button"
data-bs-toggle="dropdown">Exercises</a>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" href="../HTMLExer.html" target="_blank">HTML Exercise</a>
</li>
<li>
<a class="dropdown-item" href="../CSSExer.html" target="_blank">CSS Exercise</a>
</li>
<li>
<a class="dropdown-item" href="../JsExer.html" target="_blank">JavaScript
Exercise</a>
</li>
<li>
<a class="dropdown-item" href="../CExer.html" target="_blank">C Exercise</a>
</li>
<li>
<a class="dropdown-item" href="../JAVAExer.html" target="_blank">Java Exercise</a>
</li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="../codebot.html" target="_blank">CodeBot</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../Editor.html" target="_blank">Editor</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../About.html">About</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!--sidebar-->
<button class="topics" onclick="toggleSidebar()">Topics▼</button>
<aside class="fixed-sidebar" id="myNav">
<div class="menu">
<h2>Introduction</h2>
<button class="single" data-index="0" onclick="changeTitle('HTML Introduction | CodingNation')">
HTML Introduction
</button>
<button class="single" data-index="1" onclick="changeTitle('HTML Working | CodingNation')">
HTML Working
</button>
<button class="single" data-index="2" onclick="changeTitle('HTML Prerequisite | CodingNation')">
HTML Prerequisite
</button>
<button class="single" data-index="3" onclick="changeTitle('HTML Document Structure | CodingNation')">
HTML Document<br />
Structure
</button>
<button class="single" data-index="4" onclick="changeTitle('HTML Page Structure | CodingNation')">
HTML Page Structure
</button>
<button class="single" data-index="5" onclick="changeTitle('HTML Editors | CodingNation')">
HTML Editors
</button>
<button class="single" data-index="6" onclick="changeTitle('HTML View Source | CodingNation')">
HTML View Source
</button>
<button class="single" data-index="7" onclick="changeTitle('HTML Tags | CodingNation')">
HTML Tags
</button>
<button class="single" data-index="8" onclick="changeTitle('HTML Elements | CodingNation')">
HTML Elements
</button>
<button class="single" data-index="9" onclick="changeTitle('VS Code Installation | CodingNation')">
VS Code Installation
</button>
<h2>HTML Basic Tags</h2>
<button class="single" data-index="10" onclick="changeTitle('Skeletal Tags | CodingNation')">
Skeletal Tags
</button>
<button class="single" data-index="11" onclick="changeTitle('Heading Tag | CodingNation')">
Heading Tag
</button>
<button class="single" data-index="12" onclick="changeTitle('Paragraph Tag | CodingNation')">
Paragraph Tag
</button>
<button class="single" data-index="13" onclick="changeTitle('Horizontal Line Tag | CodingNation')">
Horizontal Line Tag
</button>
<button class="single" data-index="14" onclick="changeTitle('Line Break Tag | CodingNation')">
Line Break Tag
</button>
<button class="single" data-index="15" onclick="changeTitle('Center Tag | CodingNation')">
Center Tag
</button>
<button class="single" data-index="16" onclick="changeTitle('Preserve Formatting Tag | CodingNation')">
Preserve Formatting Tag
</button>
<h2>HTML Formatting Tags</h2>
<button class="single" data-index="17" onclick="changeTitle('Monospaced Font | CodingNation')">
Monospaced Font
</button>
<button class="single" data-index="18" onclick="changeTitle('Text Abbreviation Tag | CodingNation')">
Text Abbreviation Tag
</button>
<button class="single" data-index="19" onclick="changeTitle('Acronym Tag | CodingNation')">
Acronym Tag
</button>
<button class="single" data-index="20" onclick="changeTitle('Text Tag | CodingNation')">
Text Tag
</button>
<h2>HTML Quotations</h2>
<button class="single" data-index="21" onclick="changeTitle('Blockquote Tag | CodingNation')">
Blockquote Tag
</button>
<button class="single" data-index="22" onclick="changeTitle('Quote Tag | CodingNation')">
Quote Tag
</button>
<button class="single" data-index="23" onclick="changeTitle('Text Citation Tag | CodingNation')">
Text Citation Tag
</button>
<button class="single" data-index="24" onclick="changeTitle('Text Direction Tag | CodingNation')">
Text Direction Tag
</button>
<button class="single" data-index="25" onclick="changeTitle('Address Text Tag | CodingNation')">
Address Text Tag
</button>
<button class="single" data-index="26" onclick="changeTitle('Code Tag | CodingNation')">
Code Tag
</button>
<h2>HTML Attributes</h2>
<button class="single" data-index="27" onclick="changeTitle('HTML Attributes | CodingNation')">
HTML Attributes
</button>
<button class="single" data-index="28" onclick="changeTitle('HTML Core Attributes | CodingNation')">
HTML Core Attributes
</button>
<button class="single" data-index="29"
onclick="changeTitle('HTML Internationalization Attributes | CodingNation')">
HTML Internationalization<br />
Attributes
</button>
<button class="single" data-index="30" onclick="changeTitle('HTML Generic Attributes | CodingNation')">
HTML Generic Attributes
</button>
<h2>HTML Links</h2>
<button class="single" data-index="31" onclick="changeTitle('HTML Links | CodingNation')">
HTML Links
</button>
<h2>HTML Comments</h2>
<button class="single" data-index="32" onclick="changeTitle('HTML Comments | CodingNation')">
HTML Comments
</button>
<h2>HTML Images</h2>
<button class="single" data-index="33" onclick="changeTitle('HTML Images | CodingNation')">
HTML Images
</button>
<h2>HTML List</h2>
<button class="single" data-index="34" onclick="changeTitle('HTML List | CodingNation')">
HTML List
</button>
<button class="single" data-index="35" onclick="changeTitle('HTML Unordered List | CodingNation')">
HTML Unordered List
</button>
<button class="single" data-index="36" onclick="changeTitle('HTML Ordered List | CodingNation')">
HTML Ordered List
</button>
<button class="single" data-index="37" onclick="changeTitle('HTML Definiton List | CodingNation')">
HTML Definiton List
</button>
<h2>HTML Tables</h2>
<button class="single" data-index="38" onclick="changeTitle('HTML Tables | CodingNation')">
HTML Tables
</button>
<h2>HTML Block Elements</h2>
<button class="single" data-index="39" onclick="changeTitle('HTML Block Elements | CodingNation')">
HTML Block Elements
</button>
<h2>HTML Inline Elements</h2>
<button class="single" data-index="40" onclick="changeTitle('HTML Inline Elements | CodingNation')">
HTML Inline Elements
</button>
<h2>HTML FORMS</h2>
<button class="single" data-index="41" onclick="changeTitle('Forms Introduction | CodingNation')">
Forms Introduction
</button>
<button class="single" data-index="42" onclick="changeTitle('More on forms | CodingNation')">
More on forms
</button>
</div>
</aside>
<!--for content side-->
<main class="main-content">
<div class="content">
<!--previous and next buttons-->
<button id="previous">Previous</button>
<button id="next">Next</button>
<!--Notes-->
<div class="notes" id="div1 ">
<h2>HTML Introduction</h2>
<br />
<h3>What is HTML?</h3>
<br />
<li>
<b>HTML</b>is an initialism for
<b>"HyperText Markup Language".</b>
</li>
<li>It is the language of the web.</li>
<li>It is used to create websites.</li>
<li>
It is used to define a page layout, meaning it is a barebone page
structure.
</li>
<li>
<b>HTML</b> is used for making pages of the website also called
webpages that we see on the internet
</li>
<li>It consists of a set of tags.</li>
<li>This set of tags is written in HTML Document.</li>
<li><b>".html" </b>or <b>".htm"</b> is the extension.</li>
<li>
There are so many versions of <b>HTML</b> but <b>HTML5</b>is the
latest version.
</li>
<br />
<br />
<h3>Features of HTML</h3>
<br />
<li>It is platform-independent.</li>
<li>Images, videos, and audio can be added to a web page.</li>
<li>Hypertext can be added to the text.</li>
<li>It is a markup language.</li>
<li>It is interpreted language</li>
<li>
It can be integrated with other languages like CSS, JavaScript
etc.
</li>
<li>Semantic Structure.</li>
<li>local Storage & Indexed DB – Client-side data storage.</li>
<li>
Offline Capabilities (PWA) with Cache API & Service Workers.
</li>
<br />
<br />
<h3>Why the word HyperText & Markup Language</h3>
<br />
<p>
The word hypertext markup language comprises the words
<b>"hypertext"</b>and <b>"markup language".</b> The term
<b>"hypertext"</b> refers to the linking of text with other
documents and <b>"markup language"</b> refers to a language that
uses a set of tags.
<br />
So, <b>HTML</b>is the linking of text with other documents using
some set of tags.
</p>
<br />
<br />
<p>
<color>Note:- </color>Tags refers to some meaningful texts
enclosed in angle braces <color><...></color>. For eg.<color>
<head></color>. Each tag has a different meaning and importance in building an
HTML page which can affect the web page in its own ways
</p>
<br />
<h3>A beautiful analogy to understand HTML:</h3>
<br />
<img src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-home/Analogy.png"
alt="" /><br />
<br />
<p>
Here in the explanation for the above analogy, the car skeleton
refers to HTML with the page body. When that skeleton is painted
it the car gets CSS and after all that car is provided with some
functionalities like engine, etc (which refers to JavaScript), the
car gets life and can run. Similarly, when we develop our websites
we need HTML for the structure and if we want our website to look
good and prettier we need CSS and if we want to add
functionalities to our webpage we need JavaScript.
</p>
<br />
<br />
<h3>History of HTML:</h3>
<br />
<li>
In <b>1989,</b>
<color> Tim Berners Lee </color> established
<color>www</color> and created <color>HTML</color> in <b>1991.</b>
</li>
<li>
From <b>1995 to 1997,</b> he started working on versions of HTML.
</li>
<li>
In <b>1999,</b> a committee was organized that made
<b>HTML4.0</b> a standard.
</li>
<li>
<b>HTML4.0</b> is used by many, even today. However, the stable
version of HTML is 5.0 also known as <b>HTML5.</b>
</li>
<br />
<br />
</div>
<div class="notes" id="div2" style="display: none">
<h2>HTML Working</h2>
<br />
<p>
When we want to access any information on the internet we search
that on a web browser. The web browser gets all the content from
the web servers. This content is stored in the webservers in the
form of an HTML document.
<br />
An HTML document is first written with some tags in any code
editor or your choice of a text editor and then saved with the
<b>".html"</b>extension. After this, the browser interprets the
HTML document, reads it, and renders a web page.
</p>
<br />
<br />
<img src="https://internetingishard.netlify.app/html-markup-0761f7.562e8e23.png" alt="" /><br />
<p>
In the above figure, we open a simple text editor, then the basic
structure is to be written. Now, this file is to be saved with the
<b>"index.html"</b> filename. After saving this file, open this
file in your web browser. After opening our webpage will look like
as the output.
</p>
<br />
<br />
<p>Below we'll discuss this line briefly.</p>
<br />
<br />
<h3>How does HTML Works?</h3>
<br />
<br />
<h3>HTML Document:</h3>
<br />
<p>
It's a text document saved with the extension .html or .htm that
contains texts and some tags written between "< >" which
give the instructions needed to configure the web page.
<br />
These tags are fixed and definite. About the structure of html
document is explained further.
</p>
<br />
<h3>Browser:</h3>
<br />
<li>
A browser is an application that reads HTML documents and renders
the webpage.
</li>
<li>
They cannot read the content directly where it is stored. To
settle this conflict servers are used.
</li>
<li>
A server acts like an intermediate, it patiently listens to the
browser's request and executes it.
</li>
<li>Now the document is delivered to the browser.</li>
<li>Browsers support two parts now: parsing and rendering.</li>
<li>
When the browser is in the parsing stage, it receives raw bytes
which are converted into characters and these characters are then
converted into tokens after that tokens are converted into nodes.
Then these nodes are linked in a tree data structure known as
DOM(Document Object Model).
</li>
<li>
when the DOM tree structure has been constructed, the browser
starts its rendering. Now each node in the DOM tree will be
rendered and displayed.
</li>
<br />
<br />
<h3>Rendered Page:</h3>
<br />
<p>
The rendered page is the output screen of our HTML Document which
is the page displayed on the browser
</p>
<br />
<br />
<h3>How does the basic website work?</h3>
<br />
<li>
Web Browser(client) requests www.codewithharry.com like websites
from the webserver.
</li>
<li>Webserver in return sends HTML, CSS, and JS files to it.</li>
<li>
HTML, JS, and CSS files are parsed by a web browser and show you a
beautiful website.
</li>
<br />
<br />
</div>
<div class="notes" id="div3" style="display: none">
<h2>HTML Prerequisite</h2>
<br />
<h3>Tools needed to make an HTML page:</h3>
<br />
<p>
<b>1) HTML Editors: </b> It is a simple tool in which every piece
of HTML content has to be written. We can use any text editor as
per our choice. Here we are using Visual studio code because it is
lightweight and open-source.
<br />
Commonly used editors:
</p>
<br />
<br />
<img src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-prerequisite/Editors.png"
alt="" /><br />
<br />
<p>
<color>NOTE:</color>You can write HTML even in a Notepad. Text
editors like VS code make these things easier.
</p>
<br />
<br />
<h3>Installation of Visual Studio Code:</h3>
<br />
<li>Go to Google</li>
<li>Type Visual studio code download</li>
<li>Click on download and install it as per your OS</li>
<br />
<b>Refer to the video to understand clearly:</b><br />
<img
src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-prerequisite/Installvscode.webp"
alt="" /><br />
<p>
<b>2) Browser: </b>HTML tags are not displayed by browsers, but
are read and interpreted by them. In a web browser, HTML
structures are rendered into a styled and pretty form. Here we are
using google chrome.
<br />
Commonly used browsers:
</p>
<br />
<img src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-prerequisite/Browsers.png"
alt="" /><br />
<p>
Using any editor and any browser, we will be able to render pages.
</p>
<br />
<p>
<color>NOTE:</color>In addition, we are installing a
<b>live server extension </b> in our Vscode editor to view live
reload pages.
</p>
<br />
<p>
<b>live server extension </b> is used to launch a local
development server with a live reload feature for HTML pages.
</p>
<br />
<b>Refer to the video to understand clearly:</b><br />
<img src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-prerequisite/liveserver.webp"
alt="" />
<br />
<br />
</div>
<div class="notes" id="div4" style="display: none">
<h2>HTML Document Structure</h2>
<br />
<h3>How does an HTML document structure look?</h3>
<br />
<p>
HTML document structure contains some set of tags. Tags are some
text enclosed within <…> angle braces. A tag is like a
container for either content or other HTML tags. The below text
shows how the HTML document structure looks:
</p>
<br />
<pre class="highlight">
<code class="language-html">
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
</head >
<body >
<!-- content -->
</body >
</html >
</code>
</pre>
<br />
<br />
<p>
Do not be afraid. I will explain what is being represented above
to you.
</p>
<br />
<p>
<color>NOTE:</color>
<b> These are the five must-use tags for HTML</b>
</p>
<br />
<p>
<color><!DOCTYPE html>, <html>, <head>,
<title>, <body></color>
</p>
<br />
<pre class="highlight">
<code class="language-html">
1. <!DOCTYPE html>
</code>
</pre>
<br />
<br />
<p>
The <color><!DOCTYPE></color> declaration tag is used by the
web browser to understand the version of the HTML used in the
document. The current version is 5 i.e. HTML 5.
</p>
<br />
<pre class="highlight">
<code class="language-html">
2. <html>
</code>
</pre>
<br />
<br />
<p>
The <color> <html> </color> tag is the root of an HTML page.
</p>
<br />
<pre class="highlight">
<code class="language-html">
3. <head>
</code>
</pre>
<br />
<br />
<p>The <color> <head> </color>tag contains page metadata</p>
<br />
<pre class="highlight">
<code class="language-html">
4. <title> Document </title>
</code>
</pre>
<br />
<br />
<p>
The <color> <title> </color>tag contains the title of a page
and is shown in the browser title bar.
</p>
<br />
<pre class="highlight">
<code class="language-html">
5. </head>
</code>
</pre>
<br />
<br />
<p>
The <color> </head> </color> tag is closing of
<color> <head> </color> tag.
</p>
<br />
<pre class="highlight">
<code class="language-html">
6. <body>
</code>
</pre>
<br />
<br />
<p>
<color> <body> </color>tag is the main tag of HTML. It
contains the main body of the page and is shown in the white part
of the browser.
</p>
<br />
<pre class="highlight">
<code class="language-html">
7. </body>
</code>
</pre>
<br />
<br />
<p>
The <color> </body> </color> tag is closing of
<color> <body></color> tag.
</p>
<br />
<pre class="highlight">
<code class="language-html">
8. </html>
</code>
</pre>
<br />
<br />
<p>
The <color> </html> </color>tag is closing of
<color> <html> </color> tag.
</p>
<br />
<p>
Every HTML page needs at least these 8 lines to define a layout of
a page. We will learn more about HTML tags in the upcoming
tutorial.
</p>
<br />
<br />
</div>
<div class="notes" id="div5" style="display: none">
<h2>HTML Page Structure</h2>
<br />
<h3>A basic HTML document:</h3>
<br />
<pre class="highlight">
<code class="language-html">
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<h1>This is our first heading</h1>
<p>This is our latest paragraph</p>
</body>
</html>
</code>
</pre>
<br />
<br />
<h3>Visualization of this HTML document:</h3>
<br />
<img
src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-page-structure/HTML_Pagestructure.png"
alt="" /><br />
<br />
<h3>Display of this content on a web browser:</h3>
<br />
<br />
<img
src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-page-structure/HTML_Pagestructure2.png"
alt="" />
<br />
<p>
In the browser's title bar, all content of the
<color> <head></color>section will be displayed, while on
the white background of the browser, all content of the
<color> <body> </color>section will be displayed.
</p>
<br />
<br />
</div>
<div class="notes" id="div6" style="display: none">
<h2>HTML Editors</h2>
<br />
<h3>HTML using Notepad:</h3>
<br />
<p>
Step1: Go to notepad
<br />
Step2: Write HTML code in it
<br />
Step3: Save with ".html" extension
<br />
Step4: Open this file in the browser
</p>
<br />
<b>Refer to the video to understand clearly:</b><br />
<img src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-editors/HTMLusingnote.webp"
alt="" /><br />
<h3>HTML using Visual studio code:</h3>
<br />
<p>
Step1: Go to vs code
<br />
Step2: Write HTML code in it
<br />
Step3: Save with ".html" extension
<br />
Step4: Open this file in the browser
</p>
<br />
<b>Refer to the video to understand clearly:</b><br />
<img src="https://cwh-full-next-space.fra1.digitaloceanspaces.com/tutorial/html-editors/HTMLusingvs.webp"
alt="" /><br />
<p>
<color>NOTE:</color>
<b>In our tutorials, we are going to use VS code editor with a
live server extension installed.</b>
</p>
<br />
<br />
</div>
<div class="notes" id="div7" style="display: none">
<h2>HTML View Source</h2>
<br />
<h3>How to view the page source of the loaded HTML page?</h3>
<br />
<p>
Sometimes we want HTML content or view-source of someone’s website
and to view that there is a simple technique which is provided by
the windows.
</p>
<br />
<li>Go to that website.</li>
<li>Click the right mouse button.</li>
<li>Select the option View Page Source.</li>
<li>A new tab with view-source will appear on your screen.</li>
<br />
<img
src="https://www.lifewire.com/thmb/8ygkf6os-Y65VUarkZnLqbxxAto=/2094x1606/filters:no_upscale():max_bytes(150000):strip_icc()/001_view-html-source-in-chrome-3466725-5bef1c63c9e77c0026d66e38.jpg"
alt="" />
<br />
<h3>How to inspect the HTML element?</h3>
<br />
<p>
Sometimes we want to inspect the HTML element of someone’s website
and to do that there is a simple technique which is provided by
windows.
</p>
<br />
<li>Go to that website.</li>
<li>Click the right mouse button.</li>
<li>Select the option Inspect.</li>
<li>Now developer tool is opened on your screen.</li>
<br />
<br />
<p>
<color>NOTE:</color>
<b>You are permitted to temporarily edit/change CSS or HTML
elements on any website utilizing this developer tool.</b>
</p>
<br />
<img
src="https://curriculum-content.s3.amazonaws.com/module-3/fewpjs-changing-the-dom-with-dev-tools-and-javascript/open-page-source.gif"
alt="" />
<br />
<br />
</div>
<div class="notes" id="div8" style="display: none">
<h2>HTML Tags</h2>
<br />
<h3>What is an HTML tag?</h3>
<br />
<p>
If you want to build a beautiful website. Tags will help you to do
so.
<br />
A tag is like a container for either content or other HTML tags.
Tags are words enclosed within < and > braces.
<br />
They are like keywords which defines that how web browser will
format and display the content
<br />
Some of the tags are mentioned below,
</p>
<br />
<pre class="highlight">
<code class="language-html">
<html>
</code>
</pre>
<br />
<br />
<pre class="highlight">
<code class="language-html">
<head>
</code>
</pre>
<br />
<br />
<pre class="highlight">
<code class="language-html">
<title>
</code>
</pre>
<br />
<br />
<pre class="highlight">
<code class="language-html">
<body>
</code>
</pre>
<br />
<br />
<p>
These are also known as <b>"Starting tags"</b> or
<b>“Opening tags”.</b>
</p>
<br />
<br />
<p>The following tags end with a closing tag i.e.</p>
<br />
<li>
<color> <html> </color>tag has its closing
<color> </html> </color> tag
</li>
<li>
<color> <head></color>tag has its closing
<color> </head> </color> tag
</li>
<li>
<color> <title> </color>tag has its closing
<color></title></color> tag
</li>
<li>
<color> <body> </color>tag has its closing
<color> </body></color> tag
</li>
<br />
<p>
<b>Closing tags</b>are used to close the content in between them.
These are the tags enclosed within angle braces
<color> <,></color> and a forward slash
<color> /.</color> For example:
<color> </html>.</color>These closing tags are also known as
<b>"Ending tags".</b>
</p>
<br />
<br />