Ipdc 2 (Paper 23)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

WD(3151606) 220760116016

Practical 1&2

Aim: Write a program to use basic tags of HTML HTML


Document structure

<html>
<head>
<title>Website Title</title>
</head>
<body>
Page Content…………
……………………………..
< ! - - For Commenting Code>
</body>
</html>

NOTE: HTML file saves using extension .html or .htm

 Formatting and Font Tags:

Tag Definition Tag Definition


<b> Make text bold <br> Insert a line break
<i> Make text italic <hr> Add a thematic break
<u> Underlines the text <p> Define a paragraph
<tt> Creates inline text <pre> Defines a preformatted text
<del> Mark position of deleted text <sup> Define a superscript tag
<big> Show content in bigger size <sub> Define a subscript tag
<small> Show content in smaller size <center> Display content at center
<marquee> Adds Scrolling effect in text <font> Change color, text, size, etc.

1
WD(3151606) 220760116023

 Heading Tags: List Tags:

Tag Definition Tags Definition


<h1> 24 pt <ol> Define an orders list
<h2> 18 pt <ul> Define an unordered list
<h3> 12 pt <li> List Item
<h4> 12 pt bold <dl> Define a Definition List
<h5> 10 pt <dt> Define an item in as Definition list
<h6> 7 pt <dd> Define a description of an item in a definition list

 Table Tags:

Tag Definition

<Table> Use to create Table in HTML

<tr> Use to enter data into row of table

<th> Use to enter data as header into Row

<td> Use to enter separate Collum data in same Row

 Image Tag:

Tag Description

<img> Display the Image(It have align, src, border, width, height, alt, hspace, vspace, etc)

 Hyperlink Tag:

Tag Description

<a> Link to another page(It have href, target attributes)

2
WD(3151606) 220760116023

Program and Output of Different tags:


 Heading Tag:

<html>
<head>
<title> Heading Tags </title>
</head>
<body>

<h1> Heading font </h1>


<h2> Heading font </h2>
<h3> Heading font </h3>
<h4> Heading font </h4>
<h5> Heading font </h5>
<h6> Heading font </h6>

</body>
</html>

Output:

3
WD(3151606) 220760116023

 Formatting and Font Tag:

<html>
<head>
<title> Heading Tags </title>
</head>
<body>

<b> bold font </b><br>


<I> italic font </I><br>
<u> underline font </u><br>
<tt> typewriter font</tt><br>
<del> deleted font </del><br>
<big> bold font </big><br>
<small> small font </small><br>
<marquee> marquee effect </marquee><br>
<hr></hr><br>
<p> this is use of paragraph tag </p><br>
x<sup>2</sup>+y<sup>2</sup>=1<br>
H<sub>2</sub><br>
<center>center font</center><br>
<font color="blue" face="castellar" size="20px"> Edited font </font>
</body>
</html>

Output:

4
WD(3151606) 220760116023

 List Tag: Output:

<html>
<head>
<title> List Tag </title>
</head>
<body>

<ol type="A">
<li> milk </li>
<li> Coffee </li>
<li> Juices </li>
</ol>
<ol>
<li> Coffee </li>
<li> Tea
<ol>
<li> Black Tea </li>
<li> Green Tea </li>
</ol>
</li>
<li> Milk </li>
</ol>
<ul style="list-style-type:circle;">
<li> milk </li>
<li> Coffee </li>
<li> Juices </li>
<dl>
<dt> Milk </dt>
<dd> Cold or Hot </dd>
<dt> Coffee </dt>
<dd> Cold or Hot </dd>
<dt> Juices </dt>
<dd> Sour or Sweet </dd>
</dl>
</ul>
</body>
</html>

5
WD(3151606) 220760116023

 Table Tags:

<HTML>
<HEAD>
<TITLE> TABLE Tag </TITLE>
</HEAD>
<BODY>
<TABLE Border="width:50%">

<tr>
<th><b>Name</th>
<th><b>En no.</th>
<th><b>Gender</th>
</tr>

<tr>
<td>Jeel</td>
<td>23</td>
<td>M</td>
</tr>
<tr>
<td>Ram</td>
<td>60</td>
<td>M</td>
</tr>
<tr>
<td>laxman</td>
<td>22</td>
<td>M</td>
</tr>
</TABLE>
</BODY>
</HTML>

Output:

6
WD(3151606) 220760116023

 Image Tags:

<html>
<head>
<title> Image Tag </title>
</head>
<body>

<h2><b> Image of Lion </b></h2>


<img src="E:\jeel\image.jpg" title="image" width="400" height="275">

</body>
</html>

Output:

7
WD(3151606) 220760116023

 Hyperlink Tags:

<html>
<head>
<title> hyperlink Tag </title>
</head>
<body>

<a href="https://www.youtube.com/">
click to go on Youtube
</a>

</body>
</html>

Output:

 Frameset Tags:

<html>
<head>
<title> Frameset Tag </title>
</head>

<frameset cols="50%,50%">
<frame src="p1.html" name="LeftFrame">
<frame src="p2.html" name="RightFrame">
</frameset>

</html>

8
WD(3151606) 220760116023

Output:

 Audio and Video Tags:

<html>
<head>
<meta charset="Utf-8">
<meta name="keywords" content="html,javascript">
</head>
<body>
<center>
<video width="300" height="480" controls>
<source src="video.mp4">
</video>
<br>

<audio width="600" height="600" controls>


<source src="">
</audio>
<br>

<mark> chhin tapak dam dam </mark>

</body>
</html>

9
WD(3151606) 220760116023

Output:

10

You might also like