0% found this document useful (0 votes)
90 views

Ques 1. Write A HTML Code To Display The Different Paragraphs With Different Alignments. Solution

This document contains 12 questions and their solutions related to using different HTML tags to display text, lists, and other elements. The questions cover topics like displaying paragraphs with different alignments, creating an HTML syllabus, writing chemical equations, and displaying ordered and unordered lists with various formatting options. The solutions provided use tags like <p>, <h1>, <ol>, <ul>, and others to structure and style the content as requested.

Uploaded by

Swati Arora
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

Ques 1. Write A HTML Code To Display The Different Paragraphs With Different Alignments. Solution

This document contains 12 questions and their solutions related to using different HTML tags to display text, lists, and other elements. The questions cover topics like displaying paragraphs with different alignments, creating an HTML syllabus, writing chemical equations, and displaying ordered and unordered lists with various formatting options. The solutions provided use tags like <p>, <h1>, <ol>, <ul>, and others to structure and style the content as requested.

Uploaded by

Swati Arora
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Ques 1. Write a HTML code to display the different paragraphs with different alignments.

Solution:

<html>

<head>

<title>different paragraph alignments</title>

</head>

<body>

<p align="left">HTML, which stands for HyperText Markup Language.</p>

<p align="center">HTML is written in the form of HTML elements consisting of tags.</p>

<p align="right">The purpose of a web browser is to read HTML documents and compose them into
visual or audible web pages.</p>

</body>

</html>

OUTPUT:
Ques2. Write a HTML code to display your syllabus. Use at least three Container tags and
empty tags.

Solution:

<html>

<head>

<title>syllabus</title>

</head>

<body>

<center><h1>IITM - JP</h1></center>

<hr>

<p>Syllabus for BBA(G) IV Semester:

<br><br>

1. Taxation Law

<br><br>

2. Business Law

<br><br>

3. Computer Application

<br><br>

4. Marketing Research

<br><br>

5. Human Resource Management

<hr>

<marquee>IITM - JP <i>Nurturing Excellence</i></marquee>

</body>

</html>

OUTPUT:
Ques3. Write a HTML code to print the quadratic equation as follows: ax2+bx+c = 0

Solution:

<html>

<head>

<title>quadratic equation</title>

</head>

<body>

<h1><p>The quadratic equation is as follows:</p></h1>

<h2><p>ax<sup>2</sup>+bx+c = 0</p></h2>

</body>

</html>

OUTPUT:
Ques4. Write a HTML code which display the following expression. Put the heading as
“Chemical Equation” : 4H3PO3 = 3H3PO4 + PH3 and the other expression as: Pnew = Pold + x2 -
yacosx

Solution:

<html>

<head>

<title>chemical equation</title>

</head>

<body>

<h1><p>Chemical Equation:</p></h1>

<h2><p>4H<sub>3</sub>PO<sub>3</sub> = 3H<sub>3</sub>PO<sub>4</sub>+PH<sub>3</sub>, and

<br>

P<sub>new</sub> = P<sub>old</sub>+x<sup>2</sup>-y<sup>acosx</sup></p></h2>

</body>

</html>

OUTPUT:
Ques5. Create a web page describing you. Use <block quote> to display address, for sub
headings <pre> tag and use <em> tag wherever you are using numbers.

Solution:

<html>

<head>

<title>Aparajita</title>

</head>

<body>

<h1><p>MYSELF:</p></h1>

<pre><h2><p>Introduction:</p></h2></pre>

<p>My name is Aparajita Mukherjee

<br>

i am persuing BBA IV semester frim IITM, Janakpuri</p>

<pre><h2>Address:</h2></pre>

<block quote>C - <em>170</em>, Nanakpura, South Motibagh, New Delhi - <em>110021</em></block


quote>

</body>

</html>

OUTPUT:
Ques6. Create a web page describing your friend, where default font size should be 6 and
friend’s name should be moving front and back. Assign a suitable background color and text
color.

Solution:

<html>

<head>

<title>friends</title>

</head>

<body bgcolor="black" text="red">

<basefont="6">

<h1><p>MY FRIEND:</p></h1>

<p>My friend's name is Shailja Punia

<br>

she is a very sweet person. She is very dear to me. My frends help me whenever I need them</p>

<hr>

<marquee>my friends: Shailja, Aakriti, Karishma, Neelima, Kavita, Anjali....</marquee>

</body>

</html>

OUTPUT:
Ques7. Create a web page document that the shows the usage of div and span tag. By
changing the background color, font size and border.

Solution:

<html>

<head>

<title>div/span</title>

</head>

<body>

<div align="right" style="background-color:red">Hello World</div>

<div style="background-color:yellow">Welcome to Home</div>

<div align="center" style="font-size:24px; border:dashed; background-color:blue">HTML page</div>

<span style="background-color:green">Hello</span>

<br>

<span style="font-size:24px; Dashed; background-color:pink">HTML</span>

</body>

</html>

OUTPUT:
Ques8. Create a web page document that shows the usage of different attributes of font.

Solution:

<html>

<head>

<title>attributes of font</title>

</head>

<body>

<h2><p><font face="ravie">Home Page</font>

<br>

<font size="12">HTML page</font>

<br>

<font color="red">Hello World</font></p></h2>

</body>

</html>

OUTPUT:
Ques9. Write a HTML code to display the information about your house using ordered list.
(like features of your house, vehicles you own, etc.)

Solution:

<html>

<head>

<title>ordered list</title>

</head>

<body>

<p><h1>My House</h1></p>

<h2><ol type="1">

<li>My house is in Vasant Vihar.

<li>it is on the second floor.

<li>there are four members in my family

<li>we own 2 cars.</h2>

</body>

</html>

OUTPUT:
Ques10. Write code to display the name of planets using different type of unordered list.

Solution:

<html>

<head>

<title>ordered list</title>

</head>

<body>

<p><h1>Planets:</h1></p>

<h2><ul>

<li type="disc">Murcury

<li type="square">Venus

<li type="fill round">Earth

<li type="circle">Mars

<li type="fill round">Jupiter

<li type="square">Saturn

<li type="disc">Uranus

<li type="square">Neptune

<li type="circle">Pluto</h2>

</body>

</html>

OUTPUT:
Ques11. Write a HTML code to produce the following output:

Fruits and Vegetables

A. Vegetables
 Onion
 Potato
B. Fruits
 Mango
 Grapes

Solution:

<html>

<head>

<title>fruits & vegetables</title>

</head>

<body>

<h1><p><u>Fruits & Vegetables</u></p></h1>

<h2><ol type="A">

<li>Vegetables

<ul type="disc">

<li>Onion

<li>Potato

</ul>

<li>Fruits

<ul type="square">

<li>Mango

<li>Grapes>

</ul>

</ol></h2>
</body>

</html>

OUTPUT:
Ques12. Write a HTML code to display the following list:

 Newspapers
1. Times of India
2. Hindustan Times
3. Navbharat Times
 Magazines
1. The week
2. India Today

Solution:

<html>

<head>

<title>Journals</title>

</head>

<body>

<h2><ul type="disc">

<li>Newspapers

<ol type="1">

<li>Times of India

<li>Hindustan Times

<li>Navbharat Times

</ol>

<li>Magazines

<ol type="i">

<li>The Week

<li>India Today

</ol>

</ul></h2>
</body>

</html>

OUTPUT:
INSTITUTE OF INNOVATION IN
TECHNOLOGY AND MANAGEMENT

Computer Application – II Practical File

HTML
Submitted to:
Mr. Hemant
Assistant Professor
Submitted by:
Aparajita Mukherjee
00290401709
BBA(G) M1

You might also like