Create the definition list with 5 items in the HTML code

<!DOCTYPE html>

<html>

<body>

<h2> Menu </h2>

<dl>

<dt> Coffee</dt>

<dd> - 3$ </dd>

<dt> Milk</dt>

<dd> - 1$</dd>

<dt> Tea</dt>

<dd> - 1$ </dd>

<dt> Juice</dt>

<dd> - 1$</dd>

<dt> Water</dt>

<dd> - 0,5$</dd>

<dt> Pepsi</dt>

<dd> - 2$</dd>

</dl>

</body>

</html>

 

 

Create the HTML page using a background image.

 

<!DOCTYPE html>

<html>

<body background="bgimage.jpg">

<h1>Hello world!</h1>

</body>

</html>

 

The <body> background attribute is not supported in HTML5. Use CSS instead.

CSS syntax: <body style="background-image:url(bgimage.jpg)">

 

 

Create a list of your favorite books in the HTML using CSS properties.

<!DOCTYPE html>

<html>

<head>

<style> ul {list-style: square} </style>

</head>

<body>

<h1>My favourite books</h1>

<ul>

<li>Gone with the Wind - Margaret Mitchell</li>

<li>One Hundred Years of Solitude - Gabriel García Márquez</li>

<li>The Mysterious - Jules Verne</li>

</ul>

</body>

</html>

 

 

Create the table whit 3 rows, and 3 columns, making 9 cells using CSS.

<!DOCTYPE html>

<html>

<head>

<style>

#customers {

font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;

border-collapse: collapse;

width: 100%;

}

 

#customers td, #customers th {

border: 1px solid #ddd;

padding: 8px;

}

#customers tr:nth-child(even){background-color: #f2f2f2;}

#customers tr:hover {background-color: #ddd;}

#customers th {

padding-top: 12px;

padding-bottom: 12px;

text-align: left;

background-color: #4CAF50;

color: white;

}

</style>

</head>

<body>

<table id="customers">

<tr>

<th>Company</th>

<th>Contact</th>

<th>Country</th>

</tr>

<tr>

<td>Alfreds Futterkiste</td>

<td>Maria Anders</td>

<td>Germany</td>

</tr>

<tr>

<td>Berglunds snabbköp</td>

<td>Christina Berglund</td>

<td>Sweden</td>

</tr>

</table>

</body>

</html>

 

 

Create a page to show different attribute italic, bold, underline in the HTML code.

<!DOCTYPE html>

<html>

<body>

<p><b>This text is bold</b></p>

<p><i>This text is italic</i></p>

<p><u>This text is underlined.</u></p>

</body>

</html>

 

 

Create a HTML document giving details of your name, age, telephone and address aligned in proper order.

<!DOCTYPE html>

<html>

<body>

<p> Name: Sherlock Holmes</p>

<p> Age: 36</p>

<p> Telephone number: 785412651</p>

<p> Address: Baker Street 21B, London</p>

</body>

</html>

 

15. Write HTML code to develop a web page having the background in red and title "My First Page" in blue color.

<!DOCTYPE html>

<html>

<head>

<title > My first web page </title>

</head>

<body bgcolor="red">

<h1> <font color="blue"> My first page </font> </h1>

</body>

</html>


Понравилась статья? Добавь ее в закладку (CTRL+D) и не забудь поделиться с друзьями:  



double arrow
Сейчас читают про: