-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
618 lines (552 loc) · 21.9 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Walk through your first HTML page | blog.codingninjas.in</title>
</head>
<body>
<header id="main-header">
<link rel="stylesheet" href="style.css" />
<a href="http://blog.codingninjas.in/" id="logo"
><img
src="https://ninjasfiles.s3.amazonaws.com/0000000000001394.png"
alt="coding ninjas logo"
/></a>
<div>
<p id="site-title">
<a href="http://blog.codingninjas.in/">blog.codingninjas.in</a>
</p>
<p id="about-site">Coding Ninjas Official Blog</p>
</div>
<div id="header-image-container">
<img
src="https://ninjasfiles.s3.amazonaws.com/0000000000001395.png"
alt="coding ninjas love coding"
/>
</div>
</header>
<div id="content">
<main>
<header id="blog-header">
<h1>A step-by-step walk through of your first HTML page</h1>
</header>
<div id="author-container">
<img id="author-img" src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000011_1549316247_author-pic.png" alt="author">
<span id="author-name"><a href="http://blog.codingninjas.in/author/kannumittal/">kannumittal</a></span>
<span class="slash"> / </span>
<span id="author-topic"><a href="http://blog.codingninjas.in/category/web-development/">Web Development</a></span>
</div>
<article id="blog-content">
<div id="blog-image-container">
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000010_1548494846_coding-ninjas-step-by-step.png"
alt="Step-by-step walk"
/>
</div>
<p>
HTML is short for HyperText Markup Language.Basically, it's the
"code" behind every webpage − even this one. If
you're just beginning to learn HTML, let us tell you that
it's a fairly easy task. HTML, without styling, can't do
anything more than setting a layout, drawing a table, or creating
frames − but it is handy as it helps you structure the content
correctly, which is important when you sit down to add style to your
HTML.
</p>
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000005_1548426333_coding-ninjas-code-screenshot.jpeg"
alt="Code screenshot from laptop"
/>
<p>
However simple this might seem, it is a mighty useful tool when it
comes to full-fledged web development. Various tools easily
eliminate the HTML coding from your work process − but if you
want to be in full control of your web-page, you'll need to
have some command over HTML.
</p>
<p>
Through this article, we aim to give you the essential HTML building
blocks that'll help you get up and running. Reading this,
you'll be able to understand an HTML source code and even
modify it for your own good!
</p>
<section>
<h3>Step One - TAGS</h3>
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000004_1548426302_coding-ninjas-angle-brackets.png"
alt="Angle Brackets photo"
/>
<p>
Tags are what you'll see the most when you look at any HTML
source code. A tag can ideally be seen as a wrapper to any item on
your HTML document. Tags tell what magic is to be done on the
content enclosed by them.
</p>
<p>Let's look at two types of tags:</p>
<ol>
<li>
<tag-example-1>I need a closign tag<tag-example-1>
</li>
<li><tag-example-2/>I don't need a cloding tag.</li>
</ol>
<p>
In the first example, the sentence is wrapped by two tags. The
first one is called the opening tag and the second one is called
the closing tag. Everything in between is affected by the
properties of the tag. Very commonly used examples of such tags
are <html>, <head>, <body>, <strong>, etc.
</p>
<p>
The second example tags about loner tags − as in, they
don't need a closing tag to function. Although it's not
required, these type of tags are often written as <tag/> to
make the debugging of code easier. Common examples of such tags
are <hr/> − used for horizontal line, <br/>
− to break the line, etc.
</p>
</section>
<section>
<h3>
Step Two − HTML, HEAD, and BODY: The three pillars of your
document
</h3>
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000007_1548426400_coding-ninjas-html-head-body.jpg"
alt="Head Body photo"
/>
<p>
These tags are essential for any HTML document. They parcel out
the significant parts of your HTML code.
</p>
<ul>
<li>
<BODY> </BODY> is placed below your <HEAD>
tag, and everything that you want to be displayed on your screen
comes under this tag. Text, images, links, and pretty much
anything you can see in your browser live inside this tag.
</li>
<br />
<li>
<HTML> </HTML> wraps your entire code. Everything
else in your HTML document needs to come inside these tags.
</li>
<li>
<HEAD> </HEAD> includes things like title, styles,
and scripts. Head is usually present at the top (hah!), just
inside the </HTML> tag.
</li>
</ul>
</section>
<section>
<h3>
Step three − A few tags that'll make your page pretty
</h3>
<p>
Now that you know how to set up the skeleton of your document,
let's proceed with the things that will go inside your
<BODY> tag and do some magic!
</p>
<p>Some basic text formatting tags:</p>
<ul>
<li><b> </b> makes your text look <b>bold</b></li>
<li><i> </i> makes you write in <i>cursive</i></li>
<li>
<u> </u> <u>underlines</u> what you just wrote
</li>
</ul>
<p>For example, this piece of code</p>
<hr />
<code><html></code>
<br /><br />
<code>  <head> </head></code>
<br /><br />
<code>  <body></code>
<br /><br />
<code
>    <i> I am italics! </i>
<br/></code
>
<br />
<code
>    <b> I am bold! </b> <br/></code
>
<br />
<code
>    <u> And me, well, I'm underlined! </u>
<br/></code
>
<br /><br />
<code>  </body></code>
<br /><br />
<code></html></code>
<hr />
<br />
<br />
<p>
Should produce something like this on your browser: Don't
fret too much about the <br/>. It's just for breaking
the line so that you can start from the next line. Enter key does
little when it comes to changing lines in your HTML document.
</p>
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000009_1548426552_coding-ninjas-html-page-screenshot.png"
alt="Bold, Italic and Underline"
/>
<p><b>Tags to help you structure your content:</b></p>
<ul>
<li>
<br/> breaks the line, making you continue to the next
line
</li>
<li>
<p> stands for paragraph. It divides your content into
paragraphs
</li>
</ul>
<p>
<i
>Note: You need to use these tags as space and enter keys do
very little when it comes to formatting content inside an HTML
document.</i
>
</p>
<section>
<h4>Heading Tags:</h4>
<p>
HTML provides you with six tags, from <H1> </H1> to
<H6> </H6> to help you create different sized
headers quickly.
</p>
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000006_1548426364_coding-ninjas-headings.png"
alt="All heading photos"
/>
</section>
<section>
<h4>Inserting an Image:</h4>
<p>
All that's good, but what fun without images on the
webpage? Don't worry, <IMG/> to the rescue! The image
tag has a mandatory attribute called "source".
Basically, it tells the browser where it should look for the
image. The syntax goes something like:
</p>
<p><i>< img src = "path_to_your_image" /> </i></p>
<p>
Furthermore, it also has attributes like height and width that
let you specify the height and width you want your image to
take.
</p>
</section>
<section>
<h4>Lists:</h4>
<p>
HTML has two types of lists − ordered and unordered. Each
item of your list has to be enclosed in a tag. The syntax for
creating a list is fairly simple.
</p>
<p>Suppose you want to create a list like:</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<p>The following code will easily do the job for you:</p>
<hr />
<code><ul></code>
<br />
<code>  <li></code>
<code>Item 1</code>
<code></li></code>
<br />
<code>  <li></code>
<code>Item 2</code>
<code></li></code>
<br />
<code>  <li></code>
<code>Item 3</code>
<code></li></code>
<br />
<code></ul></code>
<hr />
<br />
<br />
<p>
This, by the way, was an example of an unordered list. For an
ordered list, all you need to do is replace <ul> with
<ol> and </ul> with </ol>.
</p>
<p>Let's see what the following code does:</p>
<hr />
<code><html></code>
<br /><br />
<code>  <head> </head></code>
<br /><br />
<code>  <body></code>
<br /><br />
<code>    <ul></code>
<br />
<code
>      <li> I am unordered list's item 1!
</li></code
>
<br />
<code
>      <li> I am unordered list's item 2!
</li></code
>
<br />
<code
>      <li> I am unordered list's item 3!
</li></code
>
<br />
<code
>      <li> I am unordered list's item 4!
</li></code
>
<br />
<code>    </ul></code>
<br />
<code>    <ol></code>
<br />
<code
>      <li> I am ordered list's item 1!
</li></code
>
<br />
<code
>      <li> I am ordered list's item 2!
</li></code
>
<br />
<code
>      <li> I am ordered list's item 3!
</li></code
>
<br />
<code
>      <li> I am ordered list's item 4!
</li></code
>
<br />
<code>    </ol></code>
<br /><br />
<code>  </body></code>
<br /><br />
<code></html></code>
<hr />
<br />
<br />
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000008_1548426521_coding-ninjas-html-page-list-screenshot.png"
alt="Ordered and Unordered List on HTML page"
/>
<p>
All of these tags, when arranged coherently, will provide you
with a simple webpage consisting of images, headings, and lists.
Further, there are various tags that HTML supports, and we
thoroughly recommend you to check them out and play with them!
</p>
</section>
<section>
<h2>In Conclusion</h2>
<p>
You now know enough to skim through and understand any part of
an HTML code. We request you to go ahead and try skimming
through the source code of any website (you'll find some
tags you don't know, but that's how you learn!). Oh,
and welcome to the world of web development. With HTML under
your belt, your next stop should be making your page look
beautiful using CSS.
</p>
<p>
Let us know if you had any problems in the article, and
don't forget to have a look at a source code or two!
</p>
</section>
</section>
</article>
</main>
<aside>
<section id="subscription" class="widget">
<h4 class="widget-title">
Subscribe now to stay updated with new technology trends
</h4>
<div id="subscribe-form">
<form action="">
<label for="input-name">Name</label>
<input id="input-name" name="name" type="text" />
<label for="input-email">Email *</label>
<input id="input-email" name="input-email" type="text" required />
<button class="sub-btn" type="submit">SUBSCRIBE</button>
</form>
</div>
</section>
<section id="search" class="widget">
<form action="">
<input type="text" placeholder="Search..." />
<button type="submit">
<img
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000013_1549319004_search-icon.png"
/>
</button>
</form>
</section>
<section id="recent-posts" class="widget">
<h4 class="widget-title">Recent Posts</h4>
<ul>
<li>
<p>
<a href=""
>Guiding path for a fresher to start their career in software
programming/development</a
>
</p>
</li>
<li>
<p>
<a href=""
>The undisputed truth about emotional support animal rhode
island that the experts don't want you to hear</a
>
</p>
</li>
<li>
<p>
<a href=""
>The Best Plan to use for Emotional Support Animal Oregon</a
>
</p>
</li>
<li>
<p>
<a href=""
>How to find Emotional Support Animal Illiios Online</a
>
</p>
</li>
<li>
<p><a href="">Career opportunities after mastering Python</a></p>
</li>
</ul>
</section>
<section id="recent-comments" class="widget">
<h4 class="widget-title">Recent Comments</h4>
<ul>
<li>
<p>
<a class="name" href="">A V Yogesh Rao</a>
<span>on</span>
<a href=""
>Get ready for the ultimate summer scholarship test!</a
>
</p>
</li>
<li>
<p>
<a class="name" href="">Strony Internetowe</a>
<span>on</span>
<a href="">Recursion(The good, the bad and the not so ugly)</a>
</p>
</li>
<li>
<p>
<a class="name" href="">Philip Herb</a>
<span>on</span>
<a href="">Recursion(The good, the bad and the not so ugly)</a>
</p>
</li>
<li>
<p>
<a class="name" href="">Pascher Vigra</a>
<span>on</span>
<a href="">Recursion(The good, the bad and the not so ugly)</a>
</p>
</li>
<li>
<p>
<a class="name" href="">Ananya Burman</a>
<span>on</span>
<a href="">Code your way through Competitive programming!</a>
</p>
</li>
</ul>
</section>
<section id="categories" class="widget">
<h4 class="widget-title">Categories</h4>
<ul>
<li><a href="">Android</a></li>
<li><a href="">General</a></li>
<li><a href="">Interview Experiences</a></li>
<li><a href="">Machine Learning</a></li>
<li><a href="">Ruby</a></li>
<li><a href="">Uncategorized</a></li>
<li><a href="">Web Development</a></li>
</ul>
</section>
</aside>
<div id="social">
<a
id="facebook"
class="social-btn"
target="_blank"
href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fblog.codingninjas.in%2F2018%2F03%2F13%2Fa-step-by-step-walk-through-of-your-first-html-page%2F"
><img
class="social-img"
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000014_1549330414_facebook-logo.png"
alt="fb"
/></a>
<a
id="linkedin"
class="social-btn"
target="_blank"
href="https://www.linkedin.com/shareArticle?mini=true&title=Best+Coding+Practices+for+Hassle-free+Programming&url=http%3A%2F%2Fblog.codingninjas.in%2F2018%2F04%2F02%2Fbest-coding-practices-for-hassle-free-programming%2F"
><img
class="social-img"
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000015_1549330433_linkedin-logo.png"
alt="in"
/></a>
<a
id="twitter"
class="social-btn"
target="_blank"
href="https://twitter.com/share?url=http%3A%2F%2Fblog.codingninjas.in%2F2018%2F04%2F02%2Fbest-coding-practices-for-hassle-free-programming%2F&text=Best+Coding+Practices+for+Hassle-free+Programming"
><img
class="social-img"
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000016_1549330452_twitter-logo.png"
alt="twi"
/></a>
<a
id="gmail"
class="social-btn"
target="_blank"
href="https://plus.google.com/share?url=http%3A%2F%2Fblog.codingninjas.in%2F2018%2F04%2F02%2Fbest-coding-practices-for-hassle-free-programming%2F"
><img
class="social-img"
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000017_1549330467_google-logo.png"
alt="g+"
/></a>
<a
id="whatsapp"
class="social-btn"
target="_blank"
href="whatsapp://send?text=http%3A%2F%2Fblog.codingninjas.in%2F2018%2F04%2F02%2Fbest-coding-practices-for-hassle-free-programming%2F"
><img
class="social-img"
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000018_1549330485_whatsapp-logo.png"
alt="w-app"
/></a>
<a
id="mail"
class="social-btn"
target="_blank"
href="mailto:adresse@example.com?subject=7%20best%20coding%20practices%20to%20follow%20%7C%20blog.codingninjas.in&body=http%3A%2F%2Fblog.codingninjas.in%2F2018%2F04%2F02%2Fbest-coding-practices-for-hassle-free-programming%2F"
><img
class="social-img"
src="https://ninjasfiles.s3.amazonaws.com/asset_0000000000000019_1549330510_mail-logo.png"
alt="mail"
/></a>
</div>
</div>
</body>
</html>