webLAB
webLAB
6. HTML Links: HTML uses a hyperlink to link to another document on the Web. HTML uses
the <a> (anchor) tag to create a link to another document. An anchor can point to any
resource on the Web: an HTML page, an image, a sound file, a movie, etc.
The <a> tag is used to create an anchor to link from, the href attribute is used to address
the document to link to, and the words between the open and close of the anchor tag will
be displayed as a hyperlink.
Syntax: <a href="url">Text to be displayed</a>
The Target Attribute
With the target attribute, you can define where the linked document will be opened. The line
below will open the document in a new browser window:
<a href="http://www.google.co.in/" target="_blank">Google</a>
The Anchor Tag and the Name Attribute
The name attribute is used to create a named anchor. When using named anchors, we can
create links that can jump directly into a specific section on a page, instead of letting the user
scroll around to find what he/she is looking for. The name attribute is used to create a named
anchor. The name of the anchor can be any text you care to use.
Syntax: <a name="label">Text to be displayed</a>
7. HTML images: With HTML you can display images in a document.
The Image Tag and the src Attribute
Tag Description
In HTML, images are defined with the <img> tag. To display an image on a page, you need to
use the src attribute. Src stands for "source". The value of the src attribute is the URL ofthe
image you want to display on your page.
Syntax: <img src="url">
The Alt Attribute The alt attribute is used to define an "alternate text" for an image. The value of the
alt attribute is an author-defined text: The "alt" attribute tells the reader what he or she is
missing on a page if the browser can't load images. The browser will then display the alternate text
instead of the image. It is a good practice to include the "alt" attribute for each image on a page, to
improve the display and usefulness of your document for people who have text-only browsers.
Program
Basic page
<html>
<head>
<title>firstlab</title>
</head>
<body>
<body bgcolor="cyan">
<h1 style="text-align:center;font:'times new roman'; font-size:70px "> <u> web tech lab </u></h1>
<p style="text-align:center ;font:'times new roman' ; font-size:50px ; color:grey"> so this is the <u>
<b>first</b> <i>lab</i> </u> for the session<br> <em>In this lab we'll learn how to make a web page
</em> </p>
<center>
<a href="table.html" target="_blank" style="font-size:50px ; color:red">Table</a></center>
<frameset rows = "33%, 34%, 33%">
<frame src="cat.jpeg">
<frame src="table.html">
<frame src="ul.html">
</frameset>
<noframe>
frame cant be displayed
</noframe>
</body>
</html>
Table
<html>
<head>
<title>table</title>
</head>
<body>\
<body bgcolor="grey">
<center>
<table border=1 style="border:dashed red ;class='center">
<caption style="color:cyan ; font-weight:900"> Sem 5 </caption>
<tr style="text-align:center; font-weight:900">
<td> Subjects </td>
<td> Credits </td>
</tr>
<tr style="text-align:center; font-weight:500">
<td>web tech</td>
<td>4</td>
</tr>
</table>
</center>
</body>
</html>
Ordered list
<html>
<head>
<title>table</title>
</head>
<body>
<body bgcolor="yellow">
</body>
</html>
Unordered list
<html>
<head>
<title>table</title>
</head>
<body>
<body bgcolor="yellow">
<h5 style="font:'times new roman'; font-size:40px "> subjects </h5>
<ul style="font:'times new roman'; font-size:25px">
<li>software engineering</li>
<li>web techology </li>
<li>analysis and design of algorithm </li>
<li>organizational behaviour </li>
<li>aptitude and reasoning ability</li>
<li>cognetive skills, leadership and decision making </li>
<li>human values and community outreach </li>
<li>patent drafting for beginners </li>
<li>communicative german </li>
<li>in house practical training </li>
</ul>
</body>
</html>
LAB-2A
Objective: Write a program implementing different types of lists in HTML.
Software Used: Visual Studio Code / Chrome Web Browser
Theory
HTML LISTS
HTML supports ordered, unordered and definition lists.