Académique Documents
Professionnel Documents
Culture Documents
NAME:K.V.KARTHIK
REG NO:16MIS0327
1. HTML TEXT FORMATTING EXERCISE:
A .Print the squares of the numbers 1 - 20. Each number should be on a separate line,
next to it the number 2 superscripted, an equal sign and the result
CODE:
<html><head><title>print square number</title>
<style>
body{background-color:FFEFD5;}
h1{color:red;}
</style></head>
<body>
<h1 align="center">Print the square number</h1> <hr color="orange"/>
<p>1<sup>2</sup>=1<br/> 2<sup>2</sup>=4<br/> 3<sup>2</sup>=9<br/>
4<sup>2</sup>=16<br/> 5<sup>2</sup>=25<br/> 6<sup>2</sup>=36<br/>
7<sup>2</sup>=49<br/> 8<sup>2</sup>=64<br/> 9<sup>2</sup>=81<br/>
10<sup>2</sup>=100<br/> 11<sup>2</sup>=121<br/> 12<sup>2</sup>=144<br/>
13<sup>2</sup>=169<br/> 14<sup>2</sup>=196<br/> 15<sup>2</sup>=225<br/>
16<sup>2</sup>=256<br/> 17<sup>2</sup>=289<br/> 18<sup>2</sup>=324<br/>
19<sup>2</sup>=361<br/> 20<sup>2</sup>=400</p></body></html>
OUTPUT:
b. Prints 10 names with a line break between each name. The list should be
alphabetized, and to do this place a subscripted number next to each name based on
where it will go in the alphabetized list. (Example: Alan1). Print first, the
unalphabetized list with a subscript number next to each name, then the alphabetized
list. Both lists should have an
level heading
CODE:
<html><head><title>print names</title>
<style>
body{background-color:FFEFD5;}
h1,h2{color:brown;}
</style></head>
<body>
<h1 align="center">Un Alphabetized list</h1> <hr color="orange">
<p>krishna<sub>3</sub><br/> ganesh<sub>5</sub><br/> karthik<sub>4</sub><br/>
venkatesh<sub>9</sub><br/> bhagyalakshmi<sub>15</sub><br/>
saroja<sub>22</sub><br/> ganapathy<sub>1</sub><br/> lakshmi<sub>32</sub><br/>
varsha<sub>12</sub><br/> hari<sub>7</sub><br/></p> <h1 align="center">Alphabetized
list</h1> <hr color="navy blue">
<p>krishna<br/>ganesh<br/>karthik<br/>venkatesh<br/>bhagya lakshmi<br/>
saroja<br/>ganapathy<br/>varsha<br/>lakshmi<br/></p></body></html>
OUTPUT:
c. Print two lists with any information you want. One list should be an ordered list, the
other list should be an unordered list
CODE:
<html><head><title>Lists</title>
<style>
h1,h2{color:red;}
body{background-color:FFEFD5;}
ol,ul{color:blue;}
</style></head>
<body>
<h1 align="center">Ordered list</h1><hr>
<p><b>Fruits</b>
<ol>
<li>Apple</li> <li>Grapes</li> <li>Banana</li> <li>Jackfruit</li> <li>Cranberries</li>
</ol></p>
<h1 align="center">Unordered list</h1><hr>
<p><b>Vegetables</b>
<ul>
<li>Spinach</li> <li>Beans</li> <li>Ladys finger</li> <li>Cabbage</li> <li>potato</li>
</ul></p></body></html>
OUTPUT:
d. Print a list which starts with 7 with the type i
CODE:
<html><head><title>Lists</title>
<style>
body{background-color:pink;}
</style></head>
<body>
<h1 align="center" style="color:red">Lists</h1> <hr color="navy blue">
<ol type="i" start="7">
<li>Spinach</li> <li>Beans</li> <li>Ladys finger</li> <li>Cabbage</li> <li>potato</li>
<li>Apple</li> <li>Grapes</li> <li>Banana</li> <li>Jackfruit</li> <li>Cranberries</li>
</ol> </p></body> </html>
OUTPUT:
e. Prints an h1 level heading followed by a horizontal line whose width is 100%. Below
the horizontal line print a paragraph relating to the text in the heading.
CODE:
<html> <head> <title>paragraph</title>
<style>
body{background-color:FFEFD5;}
</style></head>
<body>
<h1 style="color:brown">Introduction to JAVA</h1> <hr width="100%" color="red">
<p> Java is a platform-independent programming language used to create secure and
robust application that may run on a single computer or may be distributed among servers
and clients over a network. Java features such as platform-independency and portability
ensure that while developing Java EE enterprise applications, you do not face the problems
related to hardware , network , and the operating system. Java was started as a project called
"Oak" by James Gosling in June 1991. Gosling's goals were to implement a virtual machine
and a language that had a familiar C like notation but with greater uniformity and simplicity
than C/C++. The First publication of Java 1.0 was released by Sun Microsystems in 1995. It
made the promise of "Write Once, Run Anywhere", with free runtimes on popular
platforms.</p>
<p> In 2006-2007 Sun released java as open source and and plateform independent
software. Over time new enhanced versions of Java have been released. The current version
of Java is Java 1.7 which is also known as Java 7. The Java virtual machine (JVM) is a
software implementation of a computer that executes programs like a real machine. The Java
virtual machine is written specifically for a specific operating system, e.g. for Linux a special
implementation is required as well as for Windows. Java programs are compiled by the Java
compiler into bytecode. The Java virtual machine interprets this bytecode and executes the
Java program. The Java runtime environment (JRE) consists of the JVM and the Java class
libraries and contains the necessary functionality to start Java programs. The JDK contains in
addition the development tools necessary to create Java programs. The JDK consists
therefore of a Java compiler, the Java virtual machine, and the Java class libraries. </p>
<p> The characteristics and features of java are as follows.
<b>1) Simple</b> Java is a simple language because of its various features, Java Doesn?t
Support Pointers , Operator Overloading etc. It doesn?t require unreferenced object because
java support automatic garbage collection. Java provides bug free system due to the strong
memory management.
<b>2) Object-Oriented</b> Object-Oriented Programming Language (OOPs) is the
methodology which provide software development and maintenance by using object state,
behavior , and properties. Object Oriented Programming Language must have the following
characteristics.</p>
<p> 1)Encapsulation 2)Polymorphism 3)Inheritance 4)Abstraction
As the languages like Objective C, C++ fulfills the above four characteristics yet they are not
fully object oriented languages because they are structured as well as object oriented
languages. In java everything is an Object. Java can be easily extended since it is based on
the Object model</p> </html>
OUTPUT:
f. Print a definition list with 5 items
CODE:
<html> <head> <title>Definition list</title>
<style>
body{background-color:FFE4E1;}
</style></head>
<body>
<h1 align="center" style="color:green">Definition list</h1>
<dl>
<dt><b>HTML</b></dt>
<dd>HTML stands for Hyper Text Markup Language</dd>
<dd>HTML describes the structure of Web pages using markup</dd>
<dt><b>CSS</b></dt>
<dd> CSS stands for Cascading Style sheet.</dd>
<dd>CSS describes how HTML elements are to be displayed on screen, paper, or in other
media.</dd>
<dt><b>JS</b></dt>
<dd>JS stands for Java Script. </dd>
<dd>JavaScript is the programming language of HTML and the Web.</dd>
</dl> </body> </html>
OUTPUT:
g. Print two addresses in the same format used on the front of envelopes (senders
address in top left corner, receivers address in the center)
CODE:
<html> <head> <title>adddress</title>
<style>
body{background-color:FFF8DC;}
</style> </head>
<body>
<p>From:<br> Karthik,<br> Vit mens hostel,<br> Vellore Institute Of Technology.<br>
Vellore. </p>
<p align="center"> To:<br>
Venkatesh,<br>
&nbs
p; 17/291,Ra
mesh apt,<br>
&nbs
p;Achari street,<br>
&nbs
p; &n
bsp; Andhra Pradesh-524001.<br>
</p> </body> </html>
OUTPUT:
h. Print ten acronyms and abbreviations of your choosing, each separated by two lines.
Specify the data that the abbreviations and acronyms represent
CODE:
<html><head>
<title>Abbrevation and Acronym</title>
<style>
body{background-color:FFEFD5;}
</style></head>
<body> <h1 align="center" style="color:brown">Acronmys</h1>
<acronmy title="Light Amplification by the Stimulated Emission of
Radation">LASER</acronomy><br><br> <acronmy title="Radio detecting and
ranging">RADAR</acronomy><br><br> <acronmy title="The North Atlantic Treaty
Organization">NATO</acronomy><br><br> <acronmy title="The United Nations
International Childrens Emergency Fund">UNICEF</acronomy><br><br> <acronmy
title="Self-contained underwater breathing apparatus">SCUBA</acronomy><br><br>
<acronmy title="White anglo saxon protestant">WASP</acronomy><br><br>
<acronmy title="Junior Reserve Officer Training Corps">JROTC</acronomy><br><br>
<acronmy title="Special Weapons And Tactics">SWAT</acronomy><br><br>
<acronmy title="Federal Bureau of Investigation">FBI</acronomy><br><br>
<acronmy title="Occupational Safety and Health
Administration">OSHA</acronomy><br><br>
<hr color="red"> <h1 align="center" style="color:pink">Abbreviations</h1>
<abbr title="Association of American Railroads">AAR</abbr><br><br> <abbr title="All
India Radio">AIR</abbr><br><br> <abbr title=" Board of Cricket Control in
India">BCCI</abbr><br><br> <abbr title="Broad Gauge">BG</abbr><br><br> <abbr
title="Central Bureau of Investigation">CBI</abbr><br><br> <abbr title=" Central Board of
Secondary Education">CBSE</abbr><br><br> <abbr title="American Association of Blood
Banks">AABB</abbr><br><br> <abbr title="Advanced Care Paramedic
">ACP</abbr><br><br> <abbr title="American Cancer Society">ACS</abbr><br><br>
<abbr title="Indian Air Force">IAF</abbr><br><br></body></html>
OUTPUT:
2. HTML IMAGE EXERCISES
a. Display five different images. Skip two lines between each image. Each image
should have a title.
CODE:
<html> <head> <title>2a</title> </head>
<body>
<table border="0" align="center">
<tr> <td> <h1 align="center">A</h1><img src="australia - windows 7
(3).jpg"width="200"height="200"></td>
<td><h1 align="center">B</h1><img src="assorted
(54).jpg"width="200"height="200"></td>
</tr> <tr>
<td><h1 align="center">C</h1><img src="assorted.jpg"width="200"height="200"></td>
<td><h1 align="center">D</h1><img src="avatar (3).jpg"width="200"height="200"></td>
</tr> <tr>
<td colspan="1"><h1 align="center">E</h1><img
src="awd.jpg"width="200"height="200"></td>
</tr> </table> </body> </html>
OUTPUT:
b. Display an image that has a border of size 2, a width of 200, and a height of
200.
CODE:
<html><head><title>image</title><style>
body{background-color:pink;}</style></head>
<body><img src="Mount Rushmore Being Carved(1932).jpg" border="1" size="2"
width="200px" height="200px" ></html>
OUTPUT:
c. Display the image towards the right corner of the webpage
CODE:
<html><head>
<title>picture</title> </head> <body> <p align="right">
<img src="australia - windows 7 (3).jpg" border="3" width="200" height="200"> </p>
<img src="australia - windows 7 (3).jpg" border="3" width="200" height="200"> </body>
</html>
OUTPUT:
******THE END******