html_tutorial_for_beginners (1) (1)
html_tutorial_for_beginners (1) (1)
DESIGNING
HTML
Hyper text markup
language
Learn coding fast
Written by
Rocky Sah
www.techlivly.com
Page 1 of 57
www.techlivly.com HTML
Structure of HTML
<html>
<head>
</head>
<body>
</body>
</html>
For example
Code
<html>
<head>
this is my heading
</head>
<body>
this is my first passage
</body>
Page 2 of 57
www.techlivly.com HTML
</html>
Output
Head tag are use to contain all the head element in the html file. It contain the
title , style , meta ,….. etc.
In this what ever we written will not show in website.
For example
Code
<html>
<head>
this is my heading
</head>
<body>
Page 3 of 57
www.techlivly.com HTML
</body>
</html>
Output
It use to define the body of html document . it contain image ,tables, list, …..
etc.
For example
code
<html>
<head>
</head>
<body>
hi my name is sumit sarkar.there we can add image, table, list ... etc
</body>
</html>
Page 4 of 57
www.techlivly.com HTML
Ouput
3) Title tag <title>
For example
code
<html>
<head>
<title>sumit sarkar technology </title>
</head>
<body>
</body>
</html>
Output
Page 5 of 57
www.techlivly.com HTML
For example
code
<html>
<head>
</head>
<body>
<h1> statement.... </h1>
<h1> statement.... </h1>
<h2> statement.... </h2>
<h3> statement.... </h3>
<h4> statement.... </h4>
<h5> statement.... </h5>
<h6> statement.... </h6>
</body>
</html>
Page 6 of 57
www.techlivly.com HTML
Output
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
hi i am sumit sarkar from india .<p> i study in dcrust university with
btechstream. </p>
</body>
Page 7 of 57
www.techlivly.com HTML
</html>
Output
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
hi i am sumit sarkar from india .<br> i study in dcrust university with btech
stream.
</body>
</html>
Page 8 of 57
www.techlivly.com HTML
Output
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
hi i am sumit sarkar from india . <b> i study in dcrust university with btech
stream. </b>
</body>
</html>
Output
Page 9 of 57
www.techlivly.com HTML
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<i>hi i am sumit sarkar from india .</i><em>i study in dcrust university with
btech stream.</em>
</body>
</html>
Output
Page 10 of 57
www.techlivly.com HTML
for example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<u> hi i am sumit sarkar from india .</u> i study in dcrust university with btech
stream.
</body>
</html>
Output
Page 11 of 57
www.techlivly.com HTML
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
</body>
</html>
Output
Page 12 of 57
www.techlivly.com HTML
for example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
</body>
</html>
Output
Page 13 of 57
www.techlivly.com HTML
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
<hr></hr>
</head>
<body>
<hr></hr>
<hr></hr>
base of 4 is 2 and it is mathematically writen in the form of 4<sub>2</sub>
<hr></hr>
<hr></hr>
</body>
</html>
Output
Page 14 of 57
www.techlivly.com HTML
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
<hr></hr>
</head>
<body>
hi my name is sumit sarkar ( without small tag).<br>
Output
Page 15 of 57
www.techlivly.com HTML
It is use to print same text which havetwo or more space or written in other line.
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
</body>
</html>
Outpu
Page 16 of 57
www.techlivly.com HTML
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
my name is <mark>sumit sarkar</mark> .i am from gaya ,bihar
</body>
</html>
Output
It is use to move anything like text image,video ,table etc at the middle.
Page 17 of 57
www.techlivly.com HTML
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<center>
<pre> center tag is use to
move any thing like image,text, table etc
in middle of the screen </pre>
</center>
</body>
</html>
Output
It is use to delete text without deleting the text that means one horizontal line is
drawn on the text .
Page 18 of 57
www.techlivly.com HTML
For example
code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
my name is sumit sarkar.<del>i am from gaya ,bihar.</del> i doing engineering
from drcust University,delhi-->
</body>
</html>
Output
For example
Page 19 of 57
www.techlivly.com HTML
code
<html>
<head>
Output
HTML LINKS
1) Ancor tag <a href= “ link” > name of icon </a>
For example
code
Page 20 of 57
www.techlivly.com HTML
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<a href="https://wordpress.com/view/technologygyan.tech.blog">
TECHNICAL SUMIT </a>
</body>
</html>
Output
This tag is use to remove underline from name of icon where we can click for
go to next page.
For example
code
<html>
<head>
</head>
<body>
<a href="https://wordpress.com/view/technologygyan.tech.blog" style="text-
decoration : none"> TECHNICAL SUMIT </a>
Page 21 of 57
www.techlivly.com HTML
</body>
</html>
Output
3) Open link in new tab tag < a href= “ link” target= “_blank ”
……………………………………………….> name of icon </a>
This tag is use for open one page to another page in another tab.
For example
code
<html>
<head>
</head>
<body>
<a href="https://worprss.com/view/technologygyan.tech.blog"target="_blank">
TECHNICAL SUMIT </a>
</body>
</html>
Output
Page 22 of 57
www.techlivly.com HTML
It is use to show instruction when we move mouse pointer on the other page
link button.
For example
code
<html>
<head>
</head>
<body>
<a href="https://wordress.com/view/technologygyan.tech.blog"target="_blank "
title="click here for access website" > TECHNICAL SUMIT </a>
</body>
</html>
Page 23 of 57
www.techlivly.com HTML
Output
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<button>
</body>
Page 24 of 57
www.techlivly.com HTML
</html>
Output
HTML IMAGE
1) Image tag <img src= “image foldername / image file name “>
For example
Code
<html>
<head>
</head>
Page 25 of 57
www.techlivly.com HTML
</body>
</html>
Output
code
<html>
<head>
Page 26 of 57
www.techlivly.com HTML
</head>
<body>
</body>
</html>
Output
It is use to show what type of image is there if the image source file is removed
or you entered wrong image file source,actually it help to know the type of
image by manually entering hint.
For example
Page 27 of 57
www.techlivly.com HTML
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
</body>
</html>
Output
HTML TABLES
1) Table tag <table>
• It is use to create table .
• By using this table we can’t create table like structure but adding some more
tag we can create table.
For example
Page 28 of 57
www.techlivly.com HTML
Code<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<table>
roll
student name
class
marks
</table>
</body>
</html>
Output
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<table>
<tr>
roll
student name
class
marks
</tr>
</table>
</body>
</html>
Output
• It has one more tag that called table data tag which specify the data of table.
(we see it in next tag)
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<table>
<tr>
<th> roll </th>
<th> student name </th>
<th> class </th>
<th> marks</th>
</tr>
</table>
</body>
</html>
Output
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<table>
<tr>
<th> roll </th>
<th> student name </th>
<th> class </th>
<th> marks</th>
</tr>
<td> 23 </td>
<td> sumit sarkar </td>
<td>12<sup>th</sup> </td>
<td> 340 </td>
</table>
</body>
</html>
Page 32 of 57
www.techlivly.com HTML
Output
5) Border of table < table border=”outer border thikness start from 1” >
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
Page 33 of 57
www.techlivly.com HTML
<body>
<table border="1">
<tr>
<th> roll </th>
<th> student name </th>
<th> class </th>
<th> marks</th>
</tr>
<td> 23 </td>
<td> sumit sarkar </td>
<td>12<sup>th</sup> </td>
<td> 340 </td>
</table>
</body>
</html>
Output
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<table border="1" cellspacing="0">
<tr>
<th> roll </th>
<th> student name </th>
<th> class </th>
<th> marks</th>
</tr>
<td> 23 </td>
<td> sumit sarkar </td>
<td>12<sup>th</sup> </td>
<td> 340 </td>
</table>
Page 35 of 57
www.techlivly.com HTML
</body>
</html>
Output
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
Page 36 of 57
www.techlivly.com HTML
</body>
</html>
Output
Note: if data or heading of table are not in middle of the box then use center tag
in table tag for middle the all data in table. if we use center tag before table tag
then all the data will be in middle but table is also move to middle.
8) Colspan colspan=”2”
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<table border="1" cellspacing="0" cellpadding="7">
<tr>
<th colspan="2"> roll </th>
<th> student name </th>
<th> class </th>
<th> marks</th>
</tr>
<td> 23 </td>
<td> sumit sarkar </td>
Page 38 of 57
www.techlivly.com HTML
<td>12<sup>th</sup> </td>
<td> 340 </td>
</table>
</body>
</html>
Output
Note- we can use it in table heading tag (th) and table data tag (td) both according to need.
9) Rowspan colspan=”2”
For example
Page 39 of 57
www.techlivly.com HTML
Code
<html>
<head>
<title> sumit sarkar technology </title>
</head>
<body>
<table border="1" cellspacing="0" cellpadding="7">
<tr>
<th rowspan="2"> roll </th>
<th> student name </th>
<th> class </th>
<th> marks</th>
</tr>
<td> 23 </td>
<td> sumit sarkar </td>
<td>12<sup>th</sup> </td>
<td> 340 </td>
</table>
</body>
</html>
Output
Page 40 of 57
www.techlivly.com HTML
Note- we can use it in table heading tag (th) and table data tag (td) both according to need.
HTML LIST
There are two type of list in html.
1) Unordered list
2) Order list
1) Unordered list <ul>
• It is use to create a unordered list which have no numbering .
• Its means in unordered list there is no numbering like 1,2,3…… or abcd etc.
• In this unordered list circle , black dot , square etc are shown in place of
1,2,3….. or abcd…..
• After written unordered list tag we must have to write <li> tag to write any
element in the list.
• We can also use a attribute to change the shape which is by default (desc
shape) to circle , square by using type=”square” , type=”circle” attributes.
For example
Code
<html>
<head>
Page 41 of 57
www.techlivly.com HTML
</head>
<body>
<ul>
<li>laptop</li>
<li>mouse</li>
<li>pen drive</li>
<li>keyboard</li>
</ul>
</body>
</html>
output
For example
Code
<html>
<head>
</head>
<body>
<ol>
<li>laptop</li>
<li>mouse</li>
<li>pen drive</li>
<li>keyboard</li>
</ol>
</body>
</html>
Output
Note- we can use start=” enter number from where to start for example 4 Or
or N ” attribute to start number from any where.
Page 43 of 57
www.techlivly.com HTML
HTML FORM
For example
Code
<html>
<head>
</head>
<body>
<form>
</form>
</body>
</html>
Output
Label tag <label> custom label name that’s show what need to type in
box </label>
Page 44 of 57
www.techlivly.com HTML
It is use to show that what need to type in the box which is creating by input
type tag.
For example
Code
<html>
<head>
</head>
<body>
<form>
<label> first name </label>
</form>
</body>
</html>
Output
• It is one of the most used form element that can be displayed in several
ways, depending on the type attribute.
• In this we can use many types attribute like text ,password, radio and many
more which is entered by user in a box which created by input tag.
For example
Page 45 of 57
www.techlivly.com HTML
Code
<html>
<head>
</head>
<body>
<form>
<input>
</form>
</body>
</html>
Output
For example
Page 46 of 57
www.techlivly.com HTML
Code
<html>
<head>
</head>
<body>
<form>
<input type="text">
</form>
</body>
</html>
Output
For example
Code
<html>
<head>
</head>
<body>
<form>
<input type="password">
</form>
</body>
</html>
Output
For example
Code
<html>
<head>
</head>
<body>
<form>
<input type="email">
</form>
</body>
</html>
Output
It is use to show suggestion inside the box where user can enter any thing.
For example
Page 49 of 57
www.techlivly.com HTML
Code
<html>
<head>
</head>
<body>
<form>
<input type="password" placeholder=”enter your password”>
</form>
</body>
</html>
Output
For example
Code
<html>
<head>
</head>
<body>
<form>
<input type="radio" name="gender(same word in both)">male
<input type="radio" name="gender(same word in both)">female
</form>
</body>
</html>
Output
It is use to create check box for user to agree to there term and condition or any
thing else.
For example
Page 51 of 57
www.techlivly.com HTML
Code
<html>
<head>
</head>
<body>
<form>
</form>
</body>
</html>
Output
For example
Page 52 of 57
www.techlivly.com HTML
Code
<html>
<head>
</head>
<body>
<form>
<input type="submit" value=click>
</form>
</body>
</html>
Output
For example
Code
<html>
<head>
</head>
<body>
<form>
<select>
</select>
</form>
</body>
</html>
Output
Page 54 of 57
www.techlivly.com HTML
For example
Code
<html>
<head>
</head>
<body>
<form>
<select>
<!-- value attribute use to show sata in database-->
<option> select your plan </option>
<option value="personal"> personal </option>
<option value="premium"> premium </option>
<option value="business"> business </option>
</select>
</form>
Page 55 of 57
www.techlivly.com HTML
</body>
</html>
Output
For example
Code
<html>
<head>
</head>
Page 56 of 57
www.techlivly.com HTML
<body>
<textarea> </textarea>
</body>
</html>
Output
Download option
Download attribute download=”file name”
For example
Code
<html>
<head>
<title> sumit sarkar technology </title>
Page 57 of 57
www.techlivly.com HTML
</head>
<body>
<button>
<a href="E:/web designing/Html.docx" download="html" title="click here for
download" > download </a>
</button>
</body>
</html>
Output