Professional Documents
Culture Documents
HTML Tech Move
HTML Tech Move
e
<!DOCTYPE
<html
<head
M
<title>Web page title</title o v
</head
<body
e c h
T
<h1>Write Your First Heading</h1
<p>Write Your First Paragraph.</p
</body
</html>
< h tml > : This tag informs the browser that it is an HTML document. Text
between html tag describes the web document. It is a container for all
other elements of HTML except <!DOCTYPE >
< h e a d> : It should be the fi rst element inside the <html> element, which
contains the metadata ( information about the document ) . It must be
closed before the body tag opens .
<title> : A s its name suggested, it is used to add title of that HTML page
which appears at the top of the browser window. It must be placed inside
the head tag and should close immediately. ( Optional )
<body> : Text between body tag describes the body content of the page
that is visible to the end user. This tag contains the main content of the
HTML document .
< h 1> : Text between <h1> tag describes the fi rst level heading of the
webpage .
< p > : Text between <p> tag describes the paragraph of the webpage.
The HTML element is everything from the start tag to the end tag :
HTML Heading:
HTML headings are de fi ned with the <h1> to <h 6 > tags .
<h1> de fi nes the most important heading. <h 6 > de fi nes the least
e
important heading .
oHeading 2
M
<h 2 >Heading 2 </h 2>
v
h
<h 3 >Heading 3 </h 3>
c
<h 4 >Heading 4 </h 4>
Heading 3
e
<h 5 >Heading 5 </h 5>
Heading 4
HTML Paragraph:
T Heading 5
Heading 6
U se <br> if you want a line break ( a new line ) without starting a new
paragraph :
The <br> tag is an empty tag, which means that it has no end tag.
HTML Elements:
A n HTML fi le is made of elements. These elements are responsible for
creating web pages and de fi ne content in that webpage. A n element in
HTML usually consist of a start tag <tag name>, close tag </tag name>
and content inserted between them.
<!DOCTYPE html
<html
<head
<title>WebPage</title
</head
<body
<h1>This is my fi rst web page</h1
<h 2 > How it looks ? </h 2
<p>It looks Nice!!!!!</p
</body
</html>
<!DOCTYPE html
<html
<head
</head
<body
<div style = "background-color: lightblue">This is fi rst div</div
<div style = "background-color: lightgreen">This is second div</div
<p style = "background-color: pink">This is a block level element</p
</body
</html>
Inline Elements
These elements does not start with new line and take width as per
re q uirement
The Inline elements are mostly used with other elements .
HTML Tag
<b> Tag: This is a physical tag, which is used to bold the text written
between it .
<strong> Tag : This is a logical tag, which tells the browser that the text is
important .
<i> Tag : This is a physical tag which is used to make text italic .
<em> Tag: This is a logical tag which is used to display content in italic .
o e
<u> Tag: This tag is used to underline text written between it .
M
v
e c h
<sup> Tag: It displays the content slightly above the normal line .
T
<p>Hello <sup>Write Your First Paragraph in superscript.</sup></p >
<big> Tag: This tag is used to increase the font si ze by one conventional
unit .
<small> Tag: This tag is used to decrease the font si ze by one unit from
base font si ze .
HTML Lists
HTML Lists are used to specify lists of information. A ll lists may contain
one or more list elements. There are three di ff erent types of HTML lists
Note: We can create a list inside another list, which will be termed as
nested List .
Example:
<ol
<li>HTML</li
<li> J ava</li
<li> J ava S cript</li
<li> SQ L</li
</ol >
Output:
HTM
J av
J ava S crip
SQL
ol type = "I" : Let ' s see the example to display list in roman number
uppercase.
Output:
I. HTM L
II. J av a
I V. SQL
S t a rt A ttri bu te :
The start attribute is used with ol tag to specify from where to start the
list items .
<ol type = "1" start = " 5 "> : It will show numeric values starting with " 5 ".
<ol type = "A" start = " 5 "> : It will show capital alphabets starting with "E".
<ol type = "a" start = " 5 "> : It will show lower case alphabets starting with
"e".
<ol type = "I" start = " 5 "> : It will show R oman upper case value starting
with " V ".
Example:
<ul
o e
M
<li>HTML</li v
h
<li> J ava</li
c
<li> J ava S cript</li
e
<li> SQ L</li
</ul >
Output:
HTM
T
J av
J ava S crip
SQL
ul type = "circle": Let ' s see the example to display list in circle bullet
Output:
HTM
J av
J ava S crip
SQL
ol type = "disc" : This is the default style. In this style, the list items are
marked with bullets .
ol type = " S q uare" : In this style, the list items are marked with s q uares .
ol type = "none" : In this style, the list items are not marked .
HTML D es c ri p ti on List
HTML Description List or De fi nition List displays elements in de fi nition
form like in dictionary.The <dl>, <dt> and <dd> tags are used to de fi ne
description list .
Example:
<dl
<dt>HTML</dt
<dd>is a markup language</dd
<dt> J ava</dt
<dd>is a programming language and platform</dd
<dt> J ava S cript</dt
<dd>is a scripting language</dd
<dt> SQ L</dt
<dd>is a q uery language</dd
</dl >
Output:
HTM L
is a markup languag e
J av a
J ava S crip t
is a scripting languag e
SQL
is a q uery language
HTML Fo r m
A n HTML form is used to collect user input. The user input is most often
sent to a server for processing .
The <Input> Element: The HTML <input> element is the most used
form element .
<input type = "radio"> Displays a radio button ( for selecting one of many
choices )
HTML Fo r m Exampl es
Following is the example for a simple form of registration
<!DOCTYPE html
<html
<head
<title>Form in HTML</title
</head
<body
<h 2 > R egistration form</h 2
<form
< fi eldset
<legend> U ser personal information</legend
<label>Enter your full name</label><br
<input type = "text" name = "name"><br
<label>Enter your email</label><br
<input type = "email" name = "email"><br
<label>Enter your password</label><br
<input type = "password" name = "pass"><br
<label>con fi rm your password</label><br
<input type = "password" name = "pass"><br
<br><label>Enter your gender</label><br
<input type = "radio" id = "gender" name = "gender" value = "male"/>Male
<br
<input type = "radio" id = "gender" name = "gender" value = "female"/
>Female <br/
<input type = "radio" id = "gender" name = "gender" value = "others"/
>others <br/
<br>Enter your A ddress:<br
<textarea></textarea><br
<input type = "submit" value = "sign-up"
</ fi eldset
</form
</body
</html >
Output:
Wh a t is M u l ti m edi a ?
Multimedia comes in many di ff erent formats. It can be almost anything
you can hear or see, like images, music, sound, videos, records, fi lms,
animations, and more .
Examples :
</video >
> The controls attribute adds video controls, like play, pause, and
volume .
> It is a good idea to always include width and height attributes. If height
and width are not set, the page might fl icker while the video loads .
> The <source> element allows you to specify alternative video fi les
which the browser may choose from. The browser will use the fi rst
recogni zed format .
> The text between the <video> and </video> tags will only be displayed
in browsers that do not support the <video> element .
HTML A udio:
> The controls attribute adds audio controls, like play, pause, and
volume .
> The text between the <audio> and </audio> tags will only be displayed
in browsers that do not support the <audio> element .
Examples :
</audio >
HTML Ta b l es
HTML tables allow web developers to arrange data into rows and
columns .
Examples
<!DOCTYPE html
<html
<head
<title>table</title
<style
table
o e
M
border-collapse: collapse v
h
width: 1 00
c
%
th,td
T
border: 2 px solid green
padding: 1 5 px
e
</style
</head
<body
<table
<tr
<th>1 header</th
<th>1 header</th
<th>1 header</th
</tr
<tr
<td>1data</td
<td>1data</td
<td>1data</td
</tr
<tr
<td> 2 data</td
<td> 2 data</td
<td> 2 data</td
</tr
<tr
<td> 3 data</td
<td> 3 data</td
<td> 3 data</td
</tr
</table
</body
</html>
R eference :
www.w 3 schools.co m
www. j avatpoint.co m
googl e
youtube
T h an k Y ou