Unit - I Introduction To HTML: Web Site
Unit - I Introduction To HTML: Web Site
Unit - I Introduction To HTML: Web Site
UNIT – I
INTRODUCTION TO HTML
Web site: A set of interconnected web pages, usually including a homepage, generally
located on the same server, and prepared and maintained as a collection of information by a
person, group, or organization.
Web Page: A web page is a document that's created in html that shows up on the internet
when you type in or go to the web page's address.
The major web browsers are Google Chrome, Firefox, Internet Explorer, Opera, and Safari.
Dept. Of CSE
1
BASIC WEB DESIGN LAB MANUAL
Web –Server
Web server refers to either the hardware (the computer) or the software (the computer
application) that helps to deliver web content that can be accessed through the Internet.
The most common use of web servers is to host websites, but there are other uses such as
gaming, data storage or running enterprise application.
Personal: It is created by an individual for his /her own personal need.URL has tidle(~).
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
<html>
<head>
</head>
<body>
</body>
</html>
URL: A uniform resource locator (URL), also known as web address, is a specific character
string that constitutes a reference to a resource. In most web browsers, the URL of a web
page is displayed on top inside an address bar. An example of a typical URL would be
"http://en.example.org/wiki/Main_Page".
WWW: The World Wide Web (WWW) is a system of interlinked hypertext documents
accessed via the Internet. With a web browser, one can view web pages that may contain
text, images, videos, and other multimedia, and navigate between them via hyperlinks.
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
Graded Exercises
1. Design a page having suitable background colour and text colour with title “My First
Web Page” using all the attributes of the Font tag.
Procedure:
<html >
<head>
<title>My first web page</title>
</head>
<body bgcolor="green">
<font size="16" color="white" face="Arial"> Welcome to GPT
TURUVEKERE...</font>
</body>
</html>
***************output***************
BASIC WEB DESIGN LAB MANUAL
2. Create a HTML document giving details of your [Name, Age], [Address, Phone] and
[Register Number, Class] aligned in proper order using alignment attributes of
Paragraph tag.
Procedure:
<html>
<head>
<title>program 02</title>
</head>
<body>
<p align="center">
Name: GPT<br>
Age: 16
</p>
<p align="right">
Address: Kodigehalli post TURUVEKERE<br>
Phone: 123535615
</p>
<p align="left">
Reg No: 169cs15015<br>
Class:2nd Sem C’s
</p>
</body>
</htmL>
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
****************output*************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
3. Write HTML code to design a page containing some text in a paragraph by giving
suitable heading style.
Procedure:
<html>
<head>
<title>program 03</title>
</head>
<body>
<center>
<h1>Basic Web design Lab</h1>
</center>
<h2 align="left"> Definition </h2>
<h3 align="left">Website</h3>
<p>
A set of inter connected web pages usually including a home page and many other web pages
</p>
</body>
</html>
**************output**************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
4. Create a page to show different character formatting (B, I, U, SUB, SUP) tags.
viz : log b m p = p logb m
Procedure:
<html>
<head>
<title>program 04</title>
</head>
<body>
<p> <b> <i> log</i></b> <sub>b </sub>m<sup> p</sup> =p<b> <i> log </i>
</b><sub>b</sub> m</p>
</body>
</html>
**************output**************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
5. Write HTML code to create a Web Page that contains an Image at its centre.
Procedure:
1. Go to start ->all program – >accessories-> notepad
2. Type the html code
3. Include <img> tag inside <center> tag and set align attribute of img tag to middle
4. Go to file->save->save the file with html extension
5. Run the html code using browsres
<html>
<head>
<title>program 05</title>
</head>
<body>
<center>
<img src="C:\Documents and Settings\All Users\Documents\My Pictures\Sample
Pictures\Winter.jpg" height="200" width="200" align="middle"/>
</center>
</body>
</html>
***************output***************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
6. Create a web page with an appropriate image towards the left hand side of the page,
when user clicks on the image another web page should open.
Procedure:
1. Go to start –>all programs-> accessories->notepad
2. Include<img> tag inside<a> tag
3. Save the file as p1.html
4. Create another file
5. Type the html code
6. Save the file as p2.html
7. In <a> tag assign p2.html to href attribute
8. Go to file-> save->save the file with html extension
9. Run the html code using browsers
<html>
<head>
<title>program 05</title>
</head>
<body>
<a href="p2.html">
<img src="C:\Documents and Settings\All Users\Documents\My Pictures\Sample
Pictures\Winter.jpg" align="left" width="200" height="200"/>
</a>
</body>
</html>
P2.html
<html>
<head>
<title>program 06</title>
</head>
<body> Hi Welcome....</body>
</html>
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
******************output******************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
7. Create web Pages using Anchor tag with its attributes for external
links. Procedure:
1. Go to start->all programs->accessories->notepad.
2. Create file called as p1.html
3. To provide external link between p1.html and gmail website use <a> in p1.html and mention
url of gmail website in href attribute.
4. Save the file.
5. Run the p1.html file using browsers.
6. If we click on the link it should link to gmail website.
P1.html
<html>
<head><title>page 1</title>
</head>
<body>
<p>Welcome to gpt</p>
<a href="http://www.gmail.com">click here to link gmail website</a>
</body>
</html>
****************output*******************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
8. Create a web page for internal links; when the user clicks on different links on the web
page it should go to the appropriate locations/sections in the same page.
Procedure:
1. Go to start->all programs->accessories->notepad.
2. Type the html code.
3. First give name for the each section of the page by using name attribute of the <a>tag
(i.e <a name=”home”> </a>)
4. To provide link for the sections use href=”#name of section” in<a> tag.
5. Go to file->save–>save the file with .html extension.
6. Run the html code using browsers.
Note: Include paragraph means, include some text paragraph in <p> tag
<html>
<head><title>program 8</title></head>
<body>
<a name="home"></a>
<p>include paragraph
</p>
<h1>contents</h1>
<a href="#link1">History</a><br>
<a href="#link2">Html version</a><br>
<a name="link1"></a>
<p>include paragraph
</p><br>
<a name="link2"></a>
html versions
<p>include paragraph
</p></br>
<a href="#home">home</a>
</body>
</html>
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
*********output************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
9. Write a HTML code to create a web page with pink color background and display
moving message in red color.
Procedure:
1. Go to start->all programs->accessories->notepad
2. Type the html code
3. Include bgcolor=”pink” attribute in the body tag
4. Use font tag to display moving text in red color by setting color=”red” attribute
5. Include marquee tag inside font tag to display moving text
6. Go to file –>save->save the file with html extension
7. Run the html code using browser
<html>
<head>
<title>program 09</title>
</head>
<body bgcolor="pink">
<font color="red"><marquee direction="left">
Welcome to GPT TURUVEKERE</marquee></font>
</body>
</html>
***********************output************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
10. Create a web page, showing an ordered list of all second semester courses
(Subjects) Procudure:
1. Go to start->all programs->accessories->notepad
2. Type the html code
3. Use <ol>-----</ol> tag to display ordered list of all subject
4. Inside <ol>tag use <li>---</li> tag to list each subject
5. Go to file –>save->save the file with html extension
6. Run the html code using browser
<html>
<head>
<title>program 09</title>
</head>
<body>
<ol>
<li>English </li>
<li>Maths-2</li>
<li>Digital Electronics & computer
fundamentals</li> <li>Basic Web design lab</li>
<li>multimedia lab</li>
<li>digital electronics</li>
</ol>
</body>
</html>
***************output****************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
11. Create a web page, showing an unordered list of names of all the Diploma Programmes
(Branches) in your institution.
Procedure:
1. Go to start- >all programs- >accessories->notepad
2. Type the html code
3.Use <ul> .......</ul> tag to display unordered list of names of all the branches
4.Inside <ul>.....</ul> tag use <li>.....</li> tag to list each branch
5.Go to file – >save –> save the file with html extension
6.Run the html code using browser
<html>
<head>
<title>program 11</title>
</head>
<body>
<ul>
<li> Computer science and Engg </li>
<li> Electronics and communication </li>
<li> Civil Engg </li>
<li> Mechanical Engg</li>
</ul>
</body>
</html>
***************output********************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
12. Create a HTML document containing a nested list showing a content page of any
book.
Procedure:
1. Go to start->all programs->accessories->notepad.
2. Type the html code.
3. Include <ol>tag for naming the chapter of the contents page.
4. Within the previous <ol>tag includes another <ol> tag to mention the different section of
the particular chapter.
5. Use <li> tag for adding the list items.
6. Go to file->save–>save the file with html extension.
7. Run the html code using browsers.
<html>
<head><title>program 12</title>
</head>
<body>
<ol type=1>
<li>chapter 1</li>
<ol type=1>
<li>section one</li>
<li>section two</li>
</ol type=1>
<li>chapter 2</li>
<ol type=1>
<li>section one</li>
<li>section two</li>
</ol>
</ol>
</body>
</html>
**************output************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
Procedure:
1. Go to start- all programs- accessories-notepad
2. Type the html code
3. Use<table>...</table> tag to draw table
4. Create 3 rows in the table by using <tr>...</tr> tag
5. In the first row create table heading by using <th>...... </th>tag
6. In the next 2 rows add the data by using <th>.....</th>tag
7. Go to file –>save->save the with.html extension]
8. Run the html file using firefox browser
<html>
<head>
<title>program 13</title>
</head>
<body>
<table border= "1">
<tr>
<th> reg.number</th>
<th> student name</th>
<th> year/semester </th>
<th>date of admission</th>
</tr>
<tr>
<td> 169cs12035</td>
<td> suma</td>
<td> 2nd</td>
<td> 06/06/2012 </td>
</tr>
<tr>
<td> 169cs12036 </td>
<td> xyz</td>
<td>2nd</td>
<td> 07/07/2012 </td>
</tr>
</table>
</body>
</html>
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
****************output********************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
14.Create a web page which divides the page in two equal frames and place the audio
and video clips in frame-1 and frame-2 respectively.
FRAME-1 FRAME-2
Procedure:
1. Go to start- >all programs-> accessories->notepad
2. Type the html code
3. Use<frameset> tag to divide the webpage into 2 equal frames by setting cols =”*,*” attribute
4. In the first frame place audio clip by using <frame> tag
5. In the second frame place video clip by using another <frame>
tag Note : audio & video & file should be in same folder
6. Go to file –>save –>save the file with html.extension
7. Run the html file using Firefox browser
<html>
<frameset cols="*,*">
<frame src="Horse-neighing.mp3">
<frame src="ARRRRR Horse.mp4-2.mp4">
</frameset>
</html>
******************output*****************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
FRAME-2
FRAME-1
FRAME-3
Procedure:
1. Go to start- >all programs-> accessories->notepad
2. Type the html code
3. Use<frameset> tag to divide the webpage into 2 equal frames by setting cols =”*,*”
attribute
4. In the first frame place video clip by using <frame> tag
5 .Again divide the second frame into 2 equal rows using rows=”50%,50%” in
another frameset tag
6 Place one audio and video clip in other 2 frames.
<html>
<frameset cols="*,*">
<frame src="ARRRRR Horse.mp4-2.mp4" name="left">
<frameset rows="50%,50%">
<frame src="Horse-neighing.mp3" name="topright">
<frame src="ARRRRR Horse.mp4-2.mp4" name="topbuttom">
</frameset>
</frameset>
</html>
********************output**********************
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
<html>
<body>
<style>
body {
background-color:blue;
}
h1 {
color:orange;
text-align:center;
}
p{
font-family: "Times New Roman";
font-size: 20px;
}
</style>
<h1>My First CSS Example</h1>
<p>This is a audio.</p>
<audio controls>
<source src="Horse-neighing.mp3">
</audio>
</body>
</html>
Dept. Of CSE
BASIC WEB DESIGN LAB MANUAL
*****************output*******************