Вы находитесь на странице: 1из 22

Question: Write an HTML code to show the following tags:

<title>,<h1><h6>, <p>,<br>,<hr>,<center>,<pre>,<font> with all its attributes.

Code:
<html>
<head>
<title>My portfolio</title>
</head>
<body bgcolor="pink">
<h1><center>Vishal Garg</h1></center>
<br>
<h2 align="center">About Me</h2>
<p> My Name is Vishal Garg. I am 20 years old. Currently, I am pursuing<br>
BCA from Vivekananda Institute of Professional Studies.</p>
<hr>
<h3>Languages known:</h3>
<pre>
<font font face="Impact" color="green" size="5">
1. Java
2. C++
3. HTML
</font>
</pre>

Page 1

Vishal Garg

<hr>
<h4>This is a h4 tag.</h4>
<h5>This is a h5 tag.</h5>
<h6>This is a h6 tag.</h6>
</body>
</html>

Page 2

Vishal Garg

OUTPUT

Page 3

Vishal Garg

Question: Write a HTML code to create different types of lists:


a. Ordered List
b. Unordered List
c. Definition List
d. A nested list which includes all the 3 types of lists.

Code:
A.
<html>
<body>
<b>ORDERED LIST</b>

<ol type="I">
<li>UpperCase Roman 1
<li>UpperCase Roman 2
</ol>

<ol type="i" start="3">


<li> LowerCase Roman 1
<li> LowerCase Roman 2
</ol>

<ol type="1" start="4">

Page 4

Vishal Garg

<li> Numeral 1
<li> Numeral 2
</ol>

<ol type="A" start="7">


<li>UpperCase Alphabet 1
<li>UpperCase Alphabet 2
</ol>

<ol type="a" start="9">


<li> LowerCase Alphabet 1
<li> LowerCase Alphabet 2
</ol>

B.
<html>
<body>
<b>UNORDERED LIST</b>

<ul type="circle">
<li>Circle list 1
<li>Circle list 2
</ul>

Page 5

Vishal Garg

<ul type="disk">
<li>Disk list 1
<li>Disk list 2
</ul>

<ul type="square">
<li>square list 1
<li>square list 2
</ul>

</body>
</html>

C.
<html>
<body>
<b>DEFINITION LIST</b>
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>

<dt>Milk</dt>

Page 6

Vishal Garg

<dd>White cold drink</dd>


</dl>
</body>
</html>

D.
<html>
<head>
<title>Lists</title>
</head>

<ol type ="1">


<li>VIPS

<ol type= "i">


<li>BCA
<ul type="disc">
<li >F.I.T
<li>Networking
<li type="circle">HTML
</ul>
<li>MCA
<ul type= "circle">

Page 7

Vishal Garg

<li>Databases
<li>Data Mining
<li>Artificial Inteliigence
</ul>

</ol>

<li>MSIT
<ol type="a">
<li>B.Sc(Physics)
<ul type= "circle">
<li>
<li>
</ul>
<li>B.Sc(Chemistry)
<ul type= "disk">
<li>
<li>
</ul>
</ol>

<li>JIMS
<ol type = "A">

Page 8

Vishal Garg

<li>B.sc CS
<dl>
<dt> WWW
<dd>World Wide Web
<dt> Internet
<dd>Network of InterConnected computers
</dl>
<li>M.sc CS
<dl>
<dt> Web Browser
<dd> Renders HTML pages
<dt> Web Server
<dd> Processes request using HTTP
</dl>
</ol>

</ol>

Page 9

Vishal Garg

OUTPUT
A.

B.

C.

Page 10

Vishal Garg

D.

Page 11

Vishal Garg

Question: Write a HTML code to show all text-level elements. Also set an image in the background.

Code:
<html>

<body background="map final.jpg">

<b>TEXT LEVEL ELEMENTS</b>


<hr>

<p>This text is normal.</p>

<p><b>This text is bold</b>.</p>

<p><i>This text is italic</i>.</p>

<h2>HTML <small>Small</small> Formatting</h2>

<p>HTML <mark>Marked</mark> Formatting</p>

<p>HTML Deleted: My favorite color is <del>blue</del> black.</p>

<p>HTML inserted: My favorite <ins>color</ins> is red.</p>

<p>This is <sub>subscripted</sub> text.</p>

<p>This is <sup>superscripted</sup> text.</p>


<hr>
</body>

</html>

Page 12

Vishal Garg

OUTPUT

Page 13

Vishal Garg

Question: Write a HTML code to create a link and insert an image. Also show the use to target
attribute.

Code:
<html>
<body>
<b>Creating Links and adding images.</b>
<hr>
<a href="http://www.google.com" target="_blank">Google!</a>
<br><br>
<p style="font-size:30px";>OR</p>
<br><br>
<a href="http://www.google.com" target="_blank"><img src="Google.ico" width="128" height="128"></a>
</body>
</html>

Page 14

Vishal Garg

OUTPUT

Page 15

Vishal Garg

Question: Write a HTML code to create a table. Also use rowspan and colspan attributes.

Code:
<html>
<body>
<table border="2">
<tr>
<th>First Name</th>
<th>Surname</th>
<th>Age</th>
</tr>

<tr>
<td>Vishal</td>
<td>Garg</td>
<td>20</td>
</tr>

<tr>
<td>Nitin</td>
<td>Hotla</td>
<td>20</td>
</tr>

<tr>
<td>Column</td>
<td colspan="2">Span</td>
</tr>

<tr>
<td rowspan="2">Row</td>
<td>Span</td>
<td>20</td>
</tr>
Page 16

Vishal Garg

<tr>
<td>Span</td>
<td>20</td>
</tr>

Page 17

Vishal Garg

OUTPUT

Page 18

Vishal Garg

Question: Write a HTML code to create different types of frames:


a. Simple Frame
b. Nested Frame
c. Linked Frame
d. Floating Frame

Code:
A.
<html>
<frameset cols="40%,50%">
<frame src="Q1.html">
<frame src="Q2a.html">
</frameset>
</html>

B.
<html>
<frameset cols="50%,50%">
<frame src="Q2b.html">
<frameset rows="50%,50%">
<frame src="Q2c.html">
<frame src="Q2d.html">
</frameset>
</frameset>
</html>

C.
<html>
<frameset rows = "60%,40%">
<frame src="Linker.html">
<frame src="Q1.html" name="destination">
</frameset>
</html>

Page 19

Vishal Garg

D.
<html>
<body>
<b style="font-size:25;">Inline Frame is being used below :</b>
<br>
<br>
<br>
<iframe src="Q5.html"></iframe>
<br>

<b style="font-size:25;">Inline Frame End</b>


</body>
</html>

Page 20

Vishal Garg

OUTPUT
A.

B.

Page 21

Vishal Garg

C.
Before Clicking:

After Clicking:

D.

Page 22

Vishal Garg

Вам также может понравиться