Web Assignment
Web Assignment
CODE_____________________________________
<!DOCTYPE html>.
<html>
<head>
</head>
<body>
</body>
</html>
2. CREATE A WEBPAGE WITH HEADINGS AND
PARAGRAPH AND ADD A TABLE IN IT.
TO
CODE__________________________________________________
<!DOCTYPE html>
<html>
<head>
<style>
TO ADD BORDER TO
Table,
THE TABLE
Th,
Td {
</style>
</head>
<body>
2
<p>This is my first page.</p>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>
</body>
</html>
3
3.CREATE A WEBPAGE WITH HEADINGS AND PARAGRAPH AND
ADD A TABLE IN IT.WRITE A CODE FOR TEXT FORMATTING
ALSO.
Baix syntax is
<style=” command;command;”>
CODE_____________________________________________________________________
<!DOCTYPE html>
<html>
<head>
<style>
table,
th,td
4
</style> </head>
<body>
Here we used the color font size
<h1>My First Page</h1> and style tag with the style tag
<p style="color:red; font-size:30px;
Inside the paragraph tag,so the
font-family:'Courier New',monospace;"> text formating is performed on
This is my first page.</p> the paragraph only
<table style="width:100%; color:yellow;">. Here the style is used to change colors to all the text of the table.
<tr>
<th>EXAMPLE</th>
<th>HTML</th>
<th>TABLE</th>
</tr>
<tr style="color:red; font-style: italic;"> Here the style tag was used in
<td>1</td>
the tr tag .tr represents the one
row of the table.sot he changes
<td>2</td>
will made to that specific row as
<td>3</td> we can see in the output code.
</tr>
<tr>
<td>4</td>
<td>5</td>
5
<td>6</td>
.
</table> </body></html>
_________________________________________________________
6
CODE__________________________________________________________
<!DOCTYPE html>
<html>
<head>
<style>
table th,td
,{
</style> </head>
font-family:'Courier New',monospace;">
<td>1</td>
IT IS UP TO US WHERE TO
<td>2</td>
USE THIS TAG TO INSERT
<td>3</td> IMAGE WHEREVER
</tr> <tr>
REQUIRED.
<td>4</td>
<td>5</td>
<td>6</td>
</tr> <tr>
<td>7</td>
7
<td>
</td>
<td>
</td>
</tr>
</table></body>
</html>
____________________________
CODE____________________________________________________
<!DOCTYPE html>
<html>
<head>
8
<style>
</head>
<tr>
<th>EXAMPLE</th>
<th>HTML</th>
<th>TABLE</th>
</tr>
</tr>
9
<td>.<img src=”C:\Users\Naincy\Desktop\web ele\1.jpeg” width=”60px”
height=”60px”> </td>
</tr> </table></body></html>
6.
<td colspan=”value”>
<td rowspan=”value”>
10
CODE__________________________________________________
<!DOCTYPE html><html> <head>
<style>
table, th,td
</style>
</head> <body>
<table>
<tr>
HERE COLSPAN IS UDES TO
<th>Country</th>
WITH VALUE 2 TO SPAN
<th colspan="2">POPULATION (IN CRORES)</th> ---------------- THIS PARTICULAR CELL TO
2 COLUMNS
</tr>
<tr>
HERE ROWSPAN IS UDES TO
<th rowspan="3"> INDIA</th>------------------------------ WITH VALUE 2 TO SPAN
<td>1998</td> THIS PARTICULAR CELL TO
3 ROWS.
<td>85</td>
</tr>
<tr>
<td>1999</td>
<td>90</td>
</tr>
<tr>
11
<td>2000</td>
<td>100</td>
</tr>
<tr>
<th rowspan="3">USA</th>
<td>1998</td>
<td> 30</td>
</tr>
<tr>
<td>1999</td>
<td>35</td>
</tr>
<tr>
<td>1999</td>
<td>90</td>
</tr>
<tr>
<th rowspan="3">UK</th>
<td>1998</td>
<td> 25</td>
</tr>
<tr>
<td>1999</td>
<td>30</td>
</tr>
<tr>
<td>1999</td>
<td>35</td>
12
</tr>
</body>
</html>
The rowspan attribute in HTML specifies the number of rows a cell should span. That is if a row spans
two rows, it means it will take up the space of two rows in that table. It allows the single table cell to span
the height of more than one cell or row. It provides the same functionality as “merge cell” in a spreadsheet
program like Excel.
7.HTML FORM
<form> tag us udes to create
form in html document.
AMD THE
INPUT TAGS
TAGS EXPLAINED_______________________________
13
INPUT TAGS___________________________________________
CODE_____________________________________
<!DOCTYPE html>
<head>
<title>Html Forms</title>
</head>
<body>
<h1><b>Registration form</b></h1>
<form>
<label for="username">Username:</label>
<label for="password">Password:</label>
14
<label for="Last Name"> LAST NAME :</label>
<label for="Email">Email:</label>
</form>
</body>
</html>
8.DIV TAG
15
CODE_________________________________________
<!DOCTYPE html>
<head>
<title>Color Layout</title>
</head>
<body>
<div style=”width: 200px; height: 150px; font-family: Arial, sans-serif text-align: center;”>
The <div> HTML element is the generic container for flow content. It has
no effect on the content or layout until styled in some way using CSS.
ORANGE
</div><br>
RED
</div>
16
<div style=”background-color: blue; color: white; width: 50%; height: 50%;”>
BLUE
</div><br>
GREEN
</div>
</div>
</body>
</html>
17