Project on HTML Savita Yadav
Project on HTML Savita Yadav
PROJECT ON – HTML
LANGUAGE
2. HTML History
The first version of HTML was written by Tim Berners-Lee
in 1993. Since then , there have been many different versions
of HTML. The most widely used version throughout the
2000’s was HTML 4.01, which became an official standard
in December 1999.
Another version, XHTML, was a rewrite of HTML as an
XML languages. XML is a standard markup language that is
to create other markup languages. Hundreds of XML
languages are in use today, including GML (Geography
Markup Language), MathML , MusicML , and RSS (Really
Simple Syndication).Since each of these languages was
written in a common language(XML), their content can easily
be shared across applications. This makes XML potentially
very powerful, and it’s no surprise that the W3C would create
an XML version of HTML (again, called XHTML). XHTML
became an official standard in 2000,and was updated in
2002.XHTML is very similar to HTML , but has stricter
rules . Strict rules are necessary for all XML languages,
because without it , interoperability between HTML and
XHTML in unit 2.
3. HTML Version
Since the early days of the web, there have been many
versions of HTML:
Version Year
HTML 1991
HTML 2.0 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 2000
HTML 5 2014
4. Tags
HTML tags are the hidden keywords within a web page that
define how your web browser must format and display the
content.
Most tags must have two parts, an opening and a closing part.
For example, <html> is the opening tag and </html> is the
closing tag. Note that the closing tag has the same text as the
opening tag, but has an additional forward-slash (/) character.
I tend to interpret this as the “end” or “close” character.
Tags are mainly two type :-
●Container Tags :- It have start tag and end tag both in
pairs.
Like: <html>.....................<html>
<p>..........................</p>
●Empty Tags :- Itave the start tag only and not have any
content.
Like: <br> or </br>
<hr>or </hr>
4.1. Html Tag
HTML tags contain HTML elements, and give a command to
browsers to read the document as an HTML document.
<html>.....................................</html>
4.2. The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration represents the document
type, and helps browsers to display web pages correctly.
It must only appear once, at the top of the page (before any
HTML tags).
The <!DOCTYPE> declaration is not case sensitive.
The <!DOCTYPE> declaration for HTML5 is:<!DOCTYPE
html>
4.3. Head Tags
Head tags define general information about the
document,page title, meta-tags,scripts and links to follow, and
other commands to browsers.
<head>
<title>HTML Tags-Head Tags</title>
</head>
4.4. Title Tags
Brief description of the web page.
<title>................................</title>
4.5. Body tags
Body tags identify the content of a content of a web page.
<body>...............................</body>
5. HTML Attributes
All HTML elements can have attribute.
Attributes provide additional information about
an element.
Attributes are always specified in the start tag.
Attributes usually come in name/value pairs like:
name=“value”
5.1. The href Attribute
HTML links are defined with the <a> tags.The link
address is specified in the href attribute:
6. HTML Elements
An HTML element is defined by a start tag, some
content, and an end tag.
<tagname>Content goes here......
</tagname>
Examples of some HTML elements:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Start Tag Element Content End Tag
<h1> My First Heading </h1>
<p> My first paragraph </p>
<br> None None
Output:-
My First Heading
My first paragraph
Example:-
<!DOCTYPE html>
<html>
<body>
<p>This is a <br> paragraph with
a line bread.</p>
</body>
</html>
Output:-
This is a
paragraph with a line bread.
PROJECT 1.
Creating a simple HTML document with paragraph heading
tags(First open the notepad++ then write this code and save
file with html extension file)
<!DOCTYPE>
<html>
<head>
<title>Simple HTML document</title>
</head>
<body>
<h1>This is a Heading 1 </h1>
<h2>This is a Heading 2</h2>
<h3>This is a Heading 3</h3>
<h4>This is a Heading 4</h4>
<h5>This is a Heading 5</h5>
<h6>This is a Heading 6</h6>
<p>Welcome to the world of HTML.</p>
<p>HTML stand for Hyper Text Markup Language.</p>
</body>
</html>
Output :-
This is a Heading 1
This is a Heading 2
This is a Heading 3
This is a Heading 4
This is a Heading 5
This is a Heading 6
PROJECT 2.
Creating a HTML document using text formatting with
background color.
<!DOCTYPE>
<html>
<head>
<title>Text formatting with background color</title>
</head>
<body style="background-color:powderblue">
<p><b>This text is bold</b></p>
<p><strong>This is a strong</strong></p>
<p><i>This text is italic</i></p>
<p><em>This text is emphasized</em></p>
<p><u>This text is underline</u></p>
<p><ins>This text is inserted<ins></p>
<p>HTML <small> HTML </small> formatting</p>
<p>HTML <mark>Marked </mark>formatting</p>
<p>MY computer price is <del>48000</del>45000</p>
<!--- Subscripted and Superscripted text-->
<p>CO<sub>2</sub>and X<sup>2</sup></p>
</body>
</html>
Output:-
This text is bold
This is a strong
This text is italic
This text is emphasized
This text is underline
This text is inserted
HTML Marked formatting
HTML HTML formatting
MY computer price is 4800045000
CO2and X2
PROJECT 3.
Creating a HTML table using internal css(style tag).
<!DOCTYPE>
<html>
<head>
<title>HTML tables</title>
<style>
table{
font-family:arial,sans-serif;
border-collapse:collapse;
width:100%;
}
td,th{
border:1px solid#dddddd;
text-align:left;
padding:8px;
}
tr:nth-child(even){
background-color:#dddddd;
}
</style>
</head>
<body>
<h2>HTML Table</h2>
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro Commercial</td>
<td>Francisco Chang</td>
<td>Maxico</td>
</tr>
<tr>
<td>Ernst Handel</td>
<td>Ronald Mendel</td>
<td>Austria</td>
</tr>
</table>
</body>
</html>
Output:-
HTML Table
Company Contact Country
Alfreds Futterkiste Maria Anders Germany
Centro Commercial Francisco Chang Maxico
Ernst Handel Ronald Mendel Austria
PROJECT 4.
Creating a HTML list (ordered or unordered)
<!DOCTYPE>
<html>
<head>
<title>HTML Lists</title>
</head>
<body>
<h2>An Unordered List</h2>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<h2>An Ordered List</h2>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Output:-
An Unordered List
•Coffee
•Tea
•Milk
An Ordered List
1.Coffee
2.Tea
3.Milk
PROJECT 5.
Text Alignment Attribute
<!DOCTYPE>
<html>
<head>
<title>Web page</title>
</head>
<body>
<p align="right">I am in the right
<p align="center">I am in the center
<p align="left">I am in the left
</body>
</html>
Output:-
I am in the right
I am in the center
I am in the left
PROJECT 6.
Link using Anchor <A> tag.
<!DOCTYPE>
<html>
<head>
<title>Web page</title>
</head>
<body>
<a href=http://student.nielit.gov.in/>studentnielit</a>
<p><a href=https://www.google.com/>Google Link</a>
</body>
</html>
Output:-
studentnielit
Google Link
PROJECT 7.
Create Horizontal Rule and HTML colors.
<!DOCTYPE>
<html>
<head>
<title>Web page</title>
</head>
<body>
<p>This is a Normal rule</p>
<hr>
<p>This is a 20pixel thick horizontal</p>
<hr size="20">
<font color="red">This is a red color</font>
<p><font color="green">This is a green color</font>
<p><font color="blue">This is a blue color</font>
<p><font color="lime">This is a lime color</font>
</body>
</html
Output:-
This is a Normal rule
digital Course
PROJECT 9.
Create a Form using <form> tag with password control,multiple
line text, checkbox and radio button control,select box.
<!DOCTYPE>
<html>
<head>
<title>Web page</title>
</head>
<body>
<form>
<caption><b>MAKE A FORM</b></caption>
<p>First Name:<input type="text" name="first name"/>
<p>Last Name:<input type="text"name="last name"/>
<p>User ID:<input type="text" name="user ID"/>
<p>Phone Number:<input type="text" name="phone"/>
<p>Password:<input type="password" name="password"/>
<p>Description:</p>
<textarea rows="5" cols="50" name="Description"/>
Enter the description here.....
</textarea><br><br>
Choose your course:<br>
<input type="checkbox"value="on">O Level<br>
<input type="checkbox"value="on">A Level<br>
Select your Qualification:<br>
<input type="radio"value="on">12th<br>
<input type="radio"value="on">Graduation<br>
<input type="radio"value="on">Master graduation<br><br>
Choose your Gender:
<select name="dropdown">
<option value="Male" selected>Male</option>
<option value="Female">Female</option>
<option value="others">Others</option></select><br>
Choose your Country:
<select name="dropdown">
<option value="India">India</option>
<option value="China">China</option>
<option value="Pakistan">Pakistan</option>
<option value="Japan">Japan</option>
<option value="America">America</option>
</select><br><br>
<input type="Submit" name="Submit" Value="submit"/>
<input type="Reset" name="Reset" value="reset"/>
<input type="Button" name="OK" value="OK"/>
</form>
</body>
</html>
Output:-
MAKE A FORM
First Name:
Last Name:
User ID:
Phone Number:
Password:
Description
Enter the description here..............
Submit Reset OK
PROJECT 10.
<!DOCTYPE>
<html>
<head>
<title>Project 10 </title>
<style type=text/css>
.leftdiv
{
float: left;
background-color:blue;
}
.middlediv
{
float: left;
background-color:green;
}
.rightdiv
{
float: left;
background-color:black;
}
div{
padding : 1%;
color: white;
background-color:grey;
width:15%;
border: 1px solid black;
}
</style>
</head>
<body>
<div class="leftdiv">
<h2> Left Side </h2>
<p>Div tag is used for group many
HTML tag like table, list, paragraph
in web page.Mostly div tag used for
a web page to partition or make a
section for content or HTML tags.
</p>
</div>
<div class="middlediv">
<h2> Middle Side </h2>
<p>Div tag is used for group many
HTML tag like table, list, paragraph
in web page.Mostly div tag used in empty
web page to partition or make section
for content or HTML tags.
</p>
</div>
<div class="rightdiv">
<h2> Right Side </h2>
<p>Div tag is used for group many
HTML tag like table, list, paragraph
in web page.Mostly div tag used for
a web page to partition or
make a section for content or HTML tags.
</p>
</div>
</body>
</html>
Output:-
Output:-
This is a Poem
Close your eyes and you can see
the way the world's suppose to be
Sunrise on a clear blue sky
fields of daisies, soft butterflies
PROJECT 12.
<!DOCTYPE>
<html>
<head>
<title>Project 12 </title>
<style type=text/css>
.leftdiv{
float: left;
background-color:red;
}
.middlediv{
float: left;
background-color:black;
}
.rightdiv
{
float: left;
background-color:purple;
}
div{
padding : 1%;
color:white;
background-color:grey;
width:10%;
border: 2px solid black;
}
table{
font-family:arial,sans-serif;
width:50%;
}
td,th{
border:2px solid#dddddd;
text-align:left;
padding:8px;
}
tr:nth-child(even){
background-color:lime;
}
</style>
</head>
<body>
<h1><font color="blue">This is a body of the web document 1
<hr></h1>
<h2><font color="lime">This is a body of the web document
2<hr></h2>
<h3><font color="green">This is a body of the web document
3<hr></h3>
<h4><font color="red">This is a body of the web document
4<hr></h4>
<h5><font color="black">This is a body of the web document
5<hr></h5>
<h6>This is a body of the web document 6<hr></h6>
<p>This is the content</p>
<br><i>This text is italic.</i>
<br><em>This is emphasized.</em>
<br><b>This text is Bold</b>
<br>This<sup>text is superscript</sup>
<br>H<sub>2</sub>O
<br><small>This is some smaller</small>
<br><Big>This is some bigger</Big>
<br><mark>This is a mark</mark>
<p>My favorite color is <del>blue</del> red.</p>
<p>The following word uses a<strike> Strikethrough</strike>
typeface.</p><br>
<a href="http://google.com" target="_blank">Google
Website</a>
<img src="Image.png" height="200" border="10"
align="center">
<p><pre style="background-color:powderblue;color:#ff0000;
font-family:Algerian;font-size:20px;">
Close your eyes and you can see
the way the world's suppose to be
Sunrise on a clear blue sky
fields of daisies, soft butterflies
Manish 5000
Java
Puneet 4000
An Unordered List
• Coffee
• Tea
• Milk
An Ordered List
1. Coffee
2. Tea
3. Milk
E.RAM
F. ROM
G.PROM
HTML Form
First Name:-
Last Name:-
Password:-
User ID:-
Select your Qualification:-
12th
Graduation
Master graduation
Male
Choose your Gender:-
Submit Reset OK