Professional Documents
Culture Documents
1. What is HTML?
Answer: HTML stands for Hypertext Markup Language. It is a layout and format defining language used
to write Web pages. It allows you to:
1.
2.
3.
4.
Lists: OL and UL
A)BACKGROUND: Specifies an image to be displayed in the background of an HTML page. Its value can
be an absolute URL or a relative URL.
B)BGCOLOR: Sets the color of the backgroud
C)TEXT: Sets the default color of normal text for the HTML page.
D)LINK: Sets the default color of unvisited links in an HTML page.
The <TABLE> tag is used to create tables in HTML pages. It has various attributes such as:
E)BORDER: Indicates the thickness, in pixels, of the border to be drawn around the table.
F)CELLPADDING: Determines the amount of space, in pixels, between individual cells in a table.
G) CEPPSPACING: Determines the amount of space, in pixels, between individual cells in a table.
H) WIDTH: Determines the width of the table.
The <IMG> tag inserts images in an HTML page. It has various attributes such as:
I) SRC: Path of the image to be displayed.
J) ALT: Alternative text to be displayed in case the image cannot be displayed.
K) LOWSRC: Path of a low resolution version of the image.
L) HEIGHT and WIDTH: Specifies the dimensions of the image.
The <HR> tag is used to draw a horizontal line in HTML pages. It has various attributes such as:
M) ALIGN: Specifies the horizontal alignment of the lines that do not span the whole page.
N) NOSHADE: Reproduces a solid black line that has no shading.
O) SIZE: Indicates the thickness of the line in pixels.
P )WIDTH: Defines the horizontal width of the line.
5. Write an example HTML page containing a table 4 X 3 and each row colored differently.
Answer: The following is an HTML page containing a table 4 X 3 and each row colored differently:
<html>
<head>
<title>Colored Table</title>
</head>
<body>
<table border="1" width="100%">
<tr bgcolor="#0000FF">
<td width="33%"> </td>
<td width="33%"> </td>
<td width="34%"> </td>
</tr>
<tr bgcolor="#00A0FF">
<td width="33%"> </td>
<td width="33%"> </td>
<td width="34%"> </td>
</tr>
<tr bgcolor="#AB00FF">
<td width="33%"> </td>
<td width="33%"> </td>
<td width="34%"> </td>
</tr>
<tr bgcolor="#FB2CFF">
<td width="33%"> </td>
<td width="33%"> </td>
<td width="34%"> </td>
</tr>
</table>
</body>
</html>