+ All Categories
Home > Documents > Q1. Write the HTML code to generate the following...

Q1. Write the HTML code to generate the following...

Date post: 13-Apr-2020
Category:
Upload: others
View: 551 times
Download: 4 times
Share this document with a friend
13
HTML EXERCISE Q1. Write the HTML code to generate the following output: Note the following points while generating the Webpage: 7.1 Link colour is green, active link colour is blue and visited links colour is red. 7.2 Title of the page is "eCommerce". 7.3 Heading of the page is maroon. 7.4 Image used is "ecommerce.jpg" 7.5 Caption of table is blue. 7.6 Background of table is "cyan". 7.7 Table border is blue and of size 2. 7.8 The 4 links are one.html, three.html and four.html. 7.9 List Heading is red. 7.10 Heading should be in centre of the page.
Transcript

HTML EXERCISE

Q1. Write the HTML code to generate the following output:

Note the following points while generating the Webpage:

7.1 Link colour is green, active link colour is blue and visited links

colour is red.

7.2 Title of the page is "eCommerce".

7.3 Heading of the page is maroon.

7.4 Image used is "ecommerce.jpg"

7.5 Caption of table is blue.

7.6 Background of table is "cyan".

7.7 Table border is blue and of size 2.

7.8 The 4 links are one.html, three.html and four.html.

7.9 List Heading is red.

7.10 Heading should be in centre of the page.

Ans:

<HTML>

<HEAD>

<TITLE>e-Commerce</TITLE>

</HEAD>

<BODY LINK="GREEN" ALINK="BLUE" VLINK="RED">

<CENTER><H2>

<FONT COLOR="MAROON"> e-Commerce</FONT>

</H2></CENTER>

Ecommerce (e-comrnerce) or electronic comrnerce,a subset of ebusiness,

<IMG SRC="I:\Class 10\class 10 2017\HTML\ecommerce.png" align="top" >e-Commerce

<BR>

is the purchasing, and exchanging of goods and services over<BR> computer

networks (such as the Internet) through which tansactgions or

<BR>

terms of sale are performed electronically.

<BR>

<BR>

<CENTER>

<CAPTION>

<FONT COLOR="BLUE">e-Commerce requirements </FONT>

</CAPTION>

</CENTER>

<P>

<TABLE ALIGN="CENTER" BGCOLOR="CYAN" BORDERCOLOR="BLUE"

BORDER="2" >

<TR ALIGN="LEFT">

<TD>shopping cart</TD>

<TD>Merchant account</TD>

</TR>

<TR ALIGN="LEFT">

<TD> Processing gateway</TD>

<TD> Digital certificate</TD>

</TR>

</TABLE>

<BR>

<FONT COLOR="RED"> Ecommerce can be broken into four main categories:</FONT>

<BR>

<UL>

<br><LI><A HREF="one.html">B2B(Business-to-Business)</A></LI>

<br><LI><A HREF="two.html">B2C(Business-to-Consumer)</A></LI>

<br><LI><A HREF="three.html">C2B(Consumer-to-Business)</A></LI>

<br><LI><A HREF="four.html">C2C(Consumer-to-Consumer)</A></LI>

</UL>

</BOdY>

</HTML>

Q2. Write the HTML code to generate the following output of a table

with the content exactly in the same format as shown within the figure

Q3. Observe the following table and write the HTML code to generate it

:

Ans:

<html><body><table border=1>

<tr><th colspan=6>Time Table</th></tr>

<tr> <th rowspan = 6>Hours</th>

<th>Mon</th><th>Tue</th><th>Wed</th>

<th>Thu</th><th>Fri</th></tr>

<tr><td>Science</td><td>Maths</td>

<td>Science</td><td>Maths</td>

<td>Arts</td></tr>

<tr><td>Social</td><td>History</td><td>English</td>

<td>Social</td><td>Sports</td></tr>

<tr><th colspan=5> Lunch</th></tr>

<tr><td> Science</td><td>Maths</td>

<td>Science</td><td>Maths</td>

<td rowspan =2> Project</td></tr>

<tr><td>Social</td><td>History</td><td>English</td>

<td>Social</td></tr>

</table>

</body>

</html>

Q4. Observe the following web page and write HTML code to generate it.

Note the following points while generating the Webpage:

•Link colour is black, background colour is yellow and visited link colour is green

•Title of the page is “wild life in India”

•Heading of the page is maroon

•Image used is “elephant.png”

•Caption of table is blue

•Table border is blue and of size 2

•The 4 links are one.html, two.html, three.html and four.html

•The email id for contact us is [email protected]

<HTML>

<HEAD><TITLE> wild life in India </TITLE></HEAD>

<BODY bgcolor=yellow LINK="black" VLINK="green">

<CENTER><H1> <FONT COLOR="maroon">INDIAN ELEPHANT</FONT>

</H1></CENTER>

<IMG SRC="elephant.png" ALIGN="right" HEIGHT=225 WIDTH=250>

<p>The Indian elephant (Elephas maximus indicus) is one of three recognised

subspecies of the

Asian elephant and native to mainland Asia. Since 1986, Elephas maximus has

been listed as

Endangered by IUCN as the population has declined by at least 50% over the last

three

generations, estimated to be 60–75 years. Asian elephants are threatened by habitat

loss,

degradation and fragmentation".

<p> See Also :

<UL>

<LI><A HREF="one.html">Sri Lankan Elephant</A>

<LI><A HREF="two.html">sumatran Elephant</A>

<LI><A HREF="three.html">Borneo Elephant</A>

<LI><A HREF="four.html">African elephant</A>

</UL>

<CENTER>

<TABLE BORDER=2 BORDERCOLOR="blue" width=25% height=175>

<font color =blue><CAPTION>Threats To Elephants</CAPTION></font>

<TR> <TD> 1<TD> Illegal Hunting</TR>

<TR><TD> 2<TD>Industrialisation</TR>

<TR><TD> 3<TD> Habitat Loss</TR>

<TR><TD> 4<TD> Fragmentation</TR>

<TR><TD> 5<TD>Disease</TR>

</TABLE><BR>For further enquiries and reservations <A

HREF="mailto:[email protected]">Contact Us</A>

</CENTER></BODY></HTML>

Q5.

Q6. Write the HTML code to generate the following output of a table

with content exactly in the same format as shown within the table:

Ans:

<HTML>

<HEAD>

<TITLE>Table</TITLE>

</HEAD>

<BODY>

<TABLE CELLSPACING=2 CELLPADDING=2 BORDER="1"

WIDTH=75%>

<TR ALIGN = IICENTER" VALIGN = "MIDDLE">

<TH COLSPAN=4> Marks </TH>

</TR>

<TR ALIGN = "LEFT" VALIGN = "MIDDLE">

<TH > English </TH>

<TH > Hindi </TH>

<TH > Maths </TH>

<TH > Science </TH>

</TR>

</TABLE>

</BODY>

</HTML>

NOTE: The TH Tags may be substituted by TD Tags

Q7.

<HTML>

<HEAD>

<TITLE>Trees: A Renewable Resource</TITLE>

</HEAD> <BODY> <H1 ALIGN="CENTER">Trees A Renewable

Resource</H1><BASEFONT SIZE="4" > <P><IMG SRC="E:\CBSE

Book\HTML\tree2.jpg" BORDER=15 ALIGN="RIGHT" WIDTH=100

HEIGHT=120> <COMMENT>Using different fonts and font

sizes</COMMENT>

<FONT SIZE="6" FACE="Georgia, Arial" COLOR="MAROON"

>T</FONT>rees are our breathing partners.We need

trees in order to live. People and animals depend on trees and plants for oxygen.

As we breathe in, our body takes in oxygen. As we breathe out, we give out carbon

dioxide. Trees do just the opposite. They take in carbon dioxide and then release

oxygen.</FONT><P>

<P><IMG SRC="E:\CBSE Book\HTML\t2.jpg" BORDER=8 ALIGN="LEFT"

WIDTH=80 HEIGHT=100>

<FONT SIZE="7" FACE="Forte, Arial" COLOR="GREEN" >T</font>rees are a

renewable natural resource.They can be renewed by replacing the trees that have

been cut and planting more trees.We also depend on forest products for things like

the wood and paper. Actually,there are more than 5,000 things that can be made

from trees.</FONT></P> <P><IMG SRC="E:\CBSE Book\HTML\tree2.jpg"

BORDER=5 ALIGN="BOTTOM" WIDTH=60 HEIGHT=80> <font size="6"

face="Century Gothic, Arial" color="RED" >T</font>oday, people are aware that

our nation's forests and trees are a valuable resource. It is in our best interest to

conserve them. Forests also provide a natural home to wildlife.Trees and forests

help us by cleaning our air, soil, and water.So let us pledge to plant a sapling

today!! </FONT></P>

<P><B><FONT FACE="Curlz MT, Helvetica" SIZE="5" COLOR="#006600">

Plant trees to save our future generations.</FONT> </B> </P>

</BASEFONT>

</BODY> </HTML>

Q8.

<HTML>

<HEAD> <TITLE>QUIZ</TITLE> </HEAD>

<BODY>

<FONT FACE = "Times New Roman" size = "4">

<CENTER>QUIZ ON COMPUTERS</CENTER>

<IMG BORDER="5" SRC="QUIZ.jpg" ALIGN="RIGHT">

<HR color="BLACK">

<COMMENT>Beginning of first ordered list</COMMENT>

<OL START=1>

<LI>A Cathode Ray Tube is found in what?

<COMMENT>Beginning of second ordered list</COMMENT>

<OL START=1 TYPE=a>

<LI>CPU

<LI>Printer

<LI>Monitor

<LI>All of above

</OL>

<HR>

<LI>The output quality of a printer is measured by

<OL START=1 TYPE=a>

<LI>Dot per inch.

<LI>Dot per sq. inch.

<LI>Dots printed per unit time.

<LI>All of above.

</OL>

<HR>

</OL>

<H5>HOW DO YOU RATE THE QUESTIONS</H5>

<UL TYPE=CIRCLE>

<LI>GOOD

<LI>AVERAGE

<LI>BAD

</UL>

</FONT> </BODY> </HTML>

Q9.

Design a webpage with the following specifications.

1. Background colour of webpage should be pink.

2. Heading should be in the center and red in colour.

3. There should be an ordered list and unordered list in the web page.

4. There should be an image at the top of the web page in the centre.

5. Use topmargin, leftmargin, right margin, link, alink, vlink attributes of

the body tag.

6. The font of the entire webpage should be of blue colour and size is 10.


Recommended