3 Web Desgining Using HTML-5
3 Web Desgining Using HTML-5
Introduction to Website
- Website is group of Linked webpage’s which is used to Display/Store information about
particular Subject over internet.
- For ex. www.iplt20.com website over internet provide information about Indian Premier
League
Webpage
- Webpage is used to store/display information in website.
- Webpage’s are linked to each other so it is called website.
- Each Website over internet has more than one webpage.
Web Browser
- Web browser is application software used for to open or view websites or webpage on
computer or mobile.
- Internet Explorer, Google Chrome, Opera etc are web browser.
HTML5
Introduction to HTML5
- HTML stands for Hyper Text Markup Language.
- HTML programming language introduced by Tim Burners Lee.
- HTML very simple programming language used for Create and Develop Websites.
Use of HTML
- Create WebPages.
- Display/Store various information on WebPages.
- Design / Decorate Webpage for Look and Feel. Creating Website
- Link WebPages to each other.
Introduction to Tag
- To Write HTML programs to Create Website , We should know Instructions in HTML
- INSTRUCTIONS USED IN HTML TO WRITE PROGRAM CALLED AS “TAG”
- TAG is “heart” and “soul” of HTML programming language.
- Without TAGS you can’t do anything in HTML.
Syntax of Tag
Types of Tag
1. Paired Tag
2. Singular Tag
Paired Tag
Welcome to <B> HTML </B> Students
Singular Tag
Hi Students <BR> Welcome to College
Singular Tag
- Singular Tags: only Opening tag is used, No need to use closing tag.
(Important: Basic structure of HTML program remain same for all HTML program )
Basic Structure Tags
1. <HTML> Tag
- HTML program must start and end with <HTML> tag.
- <HTML> tags create/read webpage into web browser.
2. <HEAD> Tag
- <Head> tag creates head section of webpage.
- Head section display title of webpage.
- <Head> tag must close before <BODY> tag.
3. <TITLE> Tag
- <Title> tag used to gives title to webpage.
- <title> tag must used opened and closed in <HEAD> tag
4. <BODY> Tag
- <Body> tag creates body section of webpage.
- Body section display or store information of webpage .
- 80% of tag used in Body section of webpage.
1. Heading Tags
Use
- Heading tags are used to display information in headings on webpage.
- <h1> to <h6> tags used to display headings on webpage.
- <h1> tag display largest level heading
- <h6> tag display smallest level heading.
1. Align
- Align attribute is used to change alignment of heading
- Value=left (d) / right / center
Write HTML program to create webpage which display your full name in 6
Heading levels at different alignment
<!doctype html>
<html>
<head>
<title> My Name in Heading </title>
</head>
<body>
<h1 align=center> MS DHONI </h1>
<h2 align=right> MS DHONI </h2>
<h3 align=center> MS DHONI </h3>
<h4 align=right> MS DHONI </h4>
<h5 align=center> MS DHONI </h5>
<h6 align=right> MS DHONI </h6>
</body>
</html>
Superscript Text
o <Sup> Tag
Use
- <Sup> tag is used to display superscript text.
- Superscript text means small letters above the line of text.
- <Sup> tag is used to display mathematical equations on webpage
- For ex. A2, 1st , 10th , A2+B2
Code : A<sup>2</sup>+B<sup>2</sup>
Output : A2+ B2
<!doctype html>
<html>
<head>
<title> Superscript text </title>
</head>
<body>
A<sup>2</sup>+2AB+B<sup>2</sup>
</body>
</html>
Output Webpage
Subscript Text
o <Sub> Tag
Use
Code : H<sub>2</sub>SO<sub>4</sub>
Output : H2SO4
<!doctype html>
<html>
<head>
<title> Subscript text </title>
</head>
<body>
Cu+So<sub>4</sub>-----------Cuso<sub>4</sub>
</body>
</html>
Output webpage
2. Text Formatting Tags
o <B> Tag
Use
- <B> tag is used to make text bold on webpage
o <U> Tag
Use
- <U> tag is used to underline the text on webpage
o <I> Tag
Use
- <I> tag is used to display text in italic on webpage
o <Small> Tag
Use
- <Small> tag is used to Display text in small size on webpage
o <Big> Tag
Use
- <Big> tag is used to Display text in big size on webpage
o <Mark> Tag
Use
- <Mark> tag is used to Highlight the text on webpage
<!doctype html>
<html>
<head>
<title> My Personal Information </title>
</head>
<body>
My self <b> Rohan Vivek Nikam </b> <br>
I am from <U> satara </U> <br>
<big> Satara </big> is District in <i> Maharashtra </i> <br>
I work at <mark> Infosys company </mark> <br>
</body>
</html>
o Output Webpage
<Font> tag
Use
- <Font> tag is used to Change color , size and face of text
- <Font> tag is paired tag.
Write html program to create webpage which display Your Village information on
webpage. Use <font> tag wherever required.
<!doctype html>
<html>
<head>
<title> My Personal Information </title>
</head>
<body>
My self <font color=red size=5> Rohan Vivek Nikam </font> <br>
I am from satara <br>
Satara is District in <font face=”Chiller” size=7 color=green> Maharashtra </font> <br>
I work at Infosys company <br>
</body>
</html>
Webpage output
<HR> Tag
Use
- <HR> tag is used to Display Horizontal Ruler[Line] on webpage
- <HR> tag is Singular tag.
-
Attributes of <HR > tag
Write html program to create webpage which display your personal information
in 2-3 statement on webpage & draw lines between every statement
<!doctype html>
<html>
<head>
<title> Horizontal Ruler </title>
</head>
<body bgcolor=black text=red>
<h1> Use of Horizontal Ruler </h1>
My Self Soham Wable
<hr color=orange size=5 width=2000>
I am From Pune
<hr color=white size=5 width=2000>
Pune is Educational & IT Hub
<hr color=green size=5 width=2000>
</body>
</html>
Webpage Output
<PRE> tag
Use
<!doctype html>
<html>
<head>
<title> Pre formatted text </title>
</head>
<body>
<h1> Pre formatted text </h1>
<pre>
*
* *
* * *
* * * *
</pre>
</body>
</html>
Webpage Output
Ordered List in HTML5
- Ordered list means list in which list items (options) display along with
specific order/sequence.
- Order of list item may be numeric, alphabetical or roman number
- For example
<OL> tag
- <OL> tag is used to define/create ordered list on webpage
- <OL> tag is paired tag
- All list items in Ordered list added inside <OL> tag
1. Type
- Type attribute is used to change type of order
- Value=1(D)/A/I/a/I
- <OL type=A> will display list items in alphabetical order
2. Start
- Start attribute is used to change starting of first list item
- <OL type=A start=3> will display first list with C & so on
3. Reversed
- Reversed attribute will display order in reverse
- <OL type=A reversed>
<LI> tag
- <LI> tag is used to add list items in ordered list
- <LI> tag is singular tag
1. India
2. Pakistan
3. England
4. Sri Lanka
<!doctype html>
<html>
<head>
<title> List of Country </title>
</head>
<body>
<h1> List of country </h1>
<OL>
<LI>India
<LI>Pakistan
<LI>England
<LI>Sri Lanka
</OL>
</body>
</html>
Write html program to create webpage which display following order list
on webpage
V. Mango
IV. Orange
III. Apple
II. Pine Apple
<!doctype html>
<html>
<head>
<title> List of Fruits </title>
</head>
<body>
<h1> List of Fruits </h1>
<OL type=I start=5 reversed>
<LI>Mango
<LI>Orange
<LI>Apple
<LI>Pine Apple
</OL>
</body>
</html>
Write html program to create webpage which display following ordered list
on webpage
K. Bhosale
J. Dhamal
I. Gadhave
H. Khandagale
<!doctype html>
<html>
<head>
<title> List of Students </title>
</head>
<body>
<h1> List of Fruits </h1>
<OL type=A start=11 reversed>
<LI>Bhosale
<LI>Dhamal
<LI>Gadhave
<LI>Khandagale
</OL>
</body>
</html>
Unordered List in HTML5
- Unordered list means list in which list items (options) display along
with specific bullets/symbol.
- Bullets of list item may be disc, square or circle
- For example
- <UL> tag & <LI> tag used to create & display ordered list
<UL> tag
- <UL> tag is used to define/create Unordered list on webpage
- <UL> tag is paired tag
- All list items in Unordered list added inside <UL> tag
1. Type
- Type attribute is used to change type of bullet/symbol
- Value=Disc(D)/Circle/Square
- <UL type=circle> will display list items along with circle symbol
<LI> tag
- <LI> tag is used to add list items in unordered list
- <LI> tag is singular tag
India
Pakistan
England
Sri Lanka
<!doctype html>
<html>
<head>
<title> List of Country </title>
</head>
<body>
<h1> List of country </h1>
<UL>
<LI>India
<LI>Pakistan
<LI>England
<LI>Sri Lanka
</UL>
</body>
</html>
Write html program to create webpage which display following unorder list
on webpage
Tata Punch
Toyota Fortuner
Mahindra Thar
Jeep
<!doctype html>
<html>
<head>
<title> List of cars </title>
</head>
<body>
<h1> List of Cars </h1>
<UL type=square>
<LI>Tata Punch
<LI>Toyota Fortuner
<LI>Mahindra Thar
<LI>Jeep
</UL>
</body>
</html>
Write html program to create webpage which display following unordered
list on webpage
o Splendor
o Pulsar
o Bullet
o RX 100
<!doctype html>
<html>
<head>
<title> List of Bikes </title>
</head>
<body>
<h1> List of Bikes </h1>
<UL type=Circle>
<LI>Splendor
<LI>Pulsar
<LI>Bullet
<LI>RX 100
</UL>
</body>
</html>
Definition List
Parts of Definition
1. Definition Term
2. Definition Description
IT Definition term
IT means Information Technology Definition Description
1. <DL> tag
2. <DT> tag
3. <DD> tag
1. <DL> tag
2. <DT> tag
3. <DD> tag
Use of Tags
<DL>
<DT> Cyber Law </DT>
<DD> Cyber Law means Rules & Regulation for Internet </DD>
<DT> Moral </DT>
<DD> Moral Referred as what is right & what is wrong </DD>
</DL>
<DL>
<DT> IT </DT>
<DD> IT means Information Technology </DD>
<DT> BIO </DT>
<DD> BIO means Biology </DD>
<DT> CHEM </DT>
<DD> CHEM means Chemistry </DD>
</DL>
</body>
</html>
<IMG> tag
Use
- <IMG> tag is used to display image on webpage
- <IMG> tag is singular tag.
1. Src
- SRC is compulsory attribute of <IMG> tag
- SRC attribute is used to provide the path(address) of image to <IMG> tag
- For Example : <IMG src=”D:\Wallpaper\sunset.jpeg”>
2. Align
- Align attribute is used to change alignment of image on webpage
- Value : Left / Right
- Default alignment of Image is Left
- For Ex. <IMG src=”D:\sun.jpeg” align=right>
3. Height
- Height attribute is used to change the height of image
- Value are used in percentage or pixels
- For Ex <IMG src=”D:\sun.jpeg” height=500>
4. Width
- Width attribute is used to change the width of image
- Value are used in percentage or pixels
- For Ex <IMG src=”D:\sun.jpeg” width=300>
5. Hspace
- Hspace attribute is used to give blank space on right and left side of image
- Value of Hspace is defined in Pixcel
- For Ex <IMG src=”D:\sun.jpeg” hspace=100>
6. Vspace
- Vspace attribute is used to give blank space on top and bottom side of image
- Value of Vspace is defined in Pixcel
- For Ex <IMG src=”D:\sun.jpeg” vspace=100>
7. Alt
- Alt attribute is used to display alternate text if image not seen for some reason
- For Ex <IMG src=”D:\sun.jpeg” alt=”Error in Image”>
<!doctype html>
<html>
<head>
<title> Image </title>
</head>
<body>
<h1> Display Image on Webpage </h1>
<Table> tag
Use
- <table> tag is used to create table on webpage
- <table> tag is paired tag
- <table> tag is container tag for <TR> ,<TH>,<TD> tag
1. Border
- Border attribute is used to define border to table
- For Ex. <Table border=5>
2. Bgcolor
- Bgcolor attribute is used to give background color to table
- For Ex. <Table Bgcolor=orange>
3. Height
- Height attribute is used to change the height of table
- For Ex. <Table height=200>
4. Width
- Width attribute is used to change the width of table.
- For Ex. <Table width=400>
5. Align
- Align attribute is used to change the alignment of table
- For Ex. <Table align=left/right/center>
- Left is default alignment of table on webpage
6. Cellspacing
- Cellspacing attribute is used to left blank space between the table cells
- For Ex. <Table border=4 cellspacing=7>
7. Cellpadding
- Cellpadding attribute is used to left blank space between cell data & cell border
- For Ex. <Table border=4 Cellpadding=5>
<TR> tag
Use
- <TR> tag is used to create table row
- <TR> tag is paired tag
- <TR> tag is container tag for <TH> & <TD> tag
<TH> tag
Use
- <TH> tag is used to fill up Table Header Data.
- <TH> tag is Paired tag.
- Basically <TH> tag is used to fill up data of First Row in table
- For Ex. <TH> Roll NO </TH>, <TH> Name </TH> etc.
<TD> tag
Use
- <TD> tag is used to fill up Table Data
- <TD> tag is paired tag
- For Ex. <TD> 101 </TD> , <TD> Sohan </TD>
<Caption> tag
Use
- <caption> tag is used to define caption or title to table
- <caption> tag used immediately after <table> tag in program
1. Colspan
- Colspan attribute is used to span multiple column cell to display data
- For ex. <TD Colspan=2> ABC </TD>
2. Rowspan
- Rowspan attribute is used to span multiple row cells to display data
- For Ex. <TD Rowspan=2> PQR </TD>
<!doctype html>
<html>
<head>
<title> Table </title>
</head>
<body>
<h1 > Student Result </h1>
<table border=4>
<tr>
<th> Roll No </th>
<th> Name </th>
<th> Total Marks </th>
<th> Percentage </th>
<th> Grade </th>
</tr>
<tr>
<td> 101 </td>
<td> Sohan </td>
<td> 446 </td>
<td> 75% </td>
<td> A </td>
</tr>
<tr>
<td> 102 </td>
<td> Rohan </td>
<td> 546 </td>
<td> 84% </td>
<td> A+ </td>
</tr>
<tr>
<td> 103 </td>
<td> Rohani </td>
<td> 385 </td>
<td> 65% </td>
<td> B+ </td>
</tr>
</table>
</body>
</html>
Write HTML program to create webpage which display information on webpage
<html>
<head>
<title> Table </title>
</head>
<body>
<h1 > Cricket Stat's </h1>
<table border=4 cellspacing=5 >
<tr>
<th> Series </th>
<th> Won </th>
<th> Lose </th>
<th> Percentage </th>
<th> Series Result </th>
</tr>
<tr>
<td> Ind V/S Aus </td>
<td> 4 </td>
<td> 1 </td>
<td> 90% </td>
<td> Champions </td>
</tr>
<tr>
<td> Ind V/S Pak </td>
<td> 7 </td>
<td> 7 </td>
<td> 100% </td>
<td> Champions </td>
</tr>
<tr>
<td> Ind V/S Eng </td>
<td> 2 </td>
<td> 3 </td>
<td> 40% </td>
<td> Runner Up </td>
</tr>
</table>
</body>
</html>
Programs on spanning tables
Write HTML program to create webpage & display following information on webpage
<!doctype html>
<html>
<head>
<title> Table </title>
</head>
<body>
<table border=4 cellspacing=10 cellpadding=10>
<tr>
<td colspan=2> DIV A </td>
<td> DIV B </td>
<td> DIV C </td>
</tr>
<tr>
<td rowspan=2> DIV D </td>
<td> DIV E </td>
<td> DIV F </td>
<td> DIV G </td>
</tr>
<tr>
<td> DIV E </td>
<td> DIV F </td>
<td> DIV G </td>
</tr>
</table>
</body>
</html>
Write HTML program to create webpage & display following information on webpage
<!doctype html>
<html>
<head>
<title> Table </title>
</head>
<body>
<table border=4 cellspacing=10 cellpadding=10>
<tr>
<td rowspan=3> Chemistry </td>
<td> Physics </td>
<td> Biology </td>
</tr>
<tr>
<td> IT </td>
<td> Math’s </td>
</tr>
<tr>
<td colspan=2> English </td>
</tr>
</table>
</body>
</html>
FORM In HTML5
1. Text Box
- Textbox Input Field is used to collect single line data from user in form
- For ex. Name , Mobile No , Adhar No etc.
- tushar
2. Password Box
- Password box Input Field is used to collect password data in form from user
- For Ex. Password , Pin , OTP etc
- ***********
3. Radio Button
- Radio Button input field allows user to choose only one option from multiple options
- For Ex. Male or Female , Yes or No , Right or Wrong etc
- Male . Female
4. Checkbox
- Checkbox input field allows user to choose multiple options from given options
- For Ex. Choose subjects, Choose language to know etc.
- Physics Chemistry Biology Math’s IT Marathi CS English Crop Sci
6. Textarea
-Textarea input fields allows to accept unlimited text from user in form
-Textarea means multi-line textbox
-For Ex. descriptive information
-
7. Submit Button
-Submit Button input fields is used to submit form data submit
8. Reset button
-Reset button is used to reset or clear the form data Reset
FORM CREATION & TAGS
<FORM> tag
1. Name
- Name attribute is used to define / give name to form.
- For Ex. <Form name=rvk>
2. Method
- Method attribute is used to set method to submit form data
- Values=Get /Post For Ex. <Form method=post>
- Get is default method to submit form data
- Let’s see difference between Get & Post method
</Form>
</body>
</html>
1. Textbox
<Input type=text>
<Input type=text name=t1 size=20 value=”Abc” maxlength=8>
2. Password Box
<Input type=Password>
<Input type=Password name=t2 size=25 maxlength=6>
3. Radio Button
4. Checkbox
6. Reset Button
7. Textarea
<Textarea> tag
1. Cols
- Cols attribute define number of column in textarea
- For Ex. <Textarea Cols=4> </textarea>
2. Rows
- Rows attribute define number of line in textarea
- For Ex. <Textarea cols=5 rows=10> </textarea>
8. DROPDOWN List
1. <Select> tag
2. <Option> tag
1. <SELECT> tag
Use
- <select> tag is used to create/define dropdown list
- <select> tag is paired tag.
- All List option added in <select> tag using <Option>t ag
1. Name
- Name attribute is used to define name
- For Ex. <Select name=city>
2. Multiple
- Multiple attribute allows us to choose multiple option from dropdown list
- For Ex. <Select name=city multiple>
3. Size
- Size attribute is used to define size of visible option in list
- For Ex. <Select name=city size=2 multiple>
Use
- <Option> tag is used to add options in Dropdown list
- <Option> tag is singular tag
- <option> tag is used inside <Select> tag to add options
1. Value
- Value attribute define default value for option
- For ex. <Option value=”s”>Satara
<Option value=”p”>Pune
2. Selected
- Selected attribute allows to option selected default in list
- For ex. <Option value=”s” selected>satara
<Option value=”p>Pune
Use
- Hyperlink is used to link WebPages to each other
- We can go quickly from one webpage to another webpage using Hyperlinks
- If we want to link 4 WebPages to each other , every webpage need 3 hyperlinks
Types of Hyperlink
1. Text Hyperlink
- Text is used as hyperlink to link WebPages
- For ex. <a href=”abc.html”> File ABC </a>
2. Image Hyperlink
- Image is used as hyperlink to link WebPages
- For Ex. <a href=”abc.html”> <img src=”sunset.jpeg”> </a>
Creation of Hyperlink
<A> tag
- <A> tag is used to create hyperlink on webpage
- <A> tag is paired tag
1. Href
- Href attribute is used to provide path of file that we want to link to hyperlink
- For ex. <a href=”abc.html”> File ABC </a>
- When you click on File ABC text in webpage , it will open abc.html file in browser
<html>
<head>
<title> File ABC </title>
</head>
<body>
<h1> THIS IS ABC FILE </h1>
<a href=”pqr.html”> FILE PQR </a>
</body>
</html> Hyperlink to pqr.html webpage
Code for pqr.html
<html>
<head>
<title> File PQR </title>
</head>
<body>
<h1> THIS IS PQR FILE </h1>
<a href=”abc.html”> FILE ABC </a>
</body>
</html> Hyperlink to abc.html webpage