CSS Hands On
CSS Hands On
1.HANDS-ON
<html>
<head>
<title>Question1</title>
<style>
#head
width: 600px;
height: 200px;
background-color: red;
color: white;
h1
text-align: center;
#div2
width: 600px;
height: 400px;
#span1
{
width: 300px;
height: 300px;
#span2
width: 300px;
height: 300px;
</style>
<body>
<div id="div2">
</div>
</body>
</html>
4) Create an anchor tag with id="menu1" and href="page1.html" and value as "Registration".
5) In the next line, create an anchor tag with id="menu2" and href="page2.html" and value as
"List".
6) In the next line, create an anchor tag with id="menu3" and href="page3.html" and value as
"Search".
ANSWER
<html>
<head>
<title>Question2</title>
</head>
<body>
<header><h1>Inventory Management System</h1></header>
<hr id="rule1" style="width:100%"></hr>
<p id="menu" style="text-align:center">
<a id="menu1" href="page1.html">Registration</a>
<a id="menu2" href="page2.html">List</a>
<a id="menu3" href="page3.html">Search</a>
</p>
<hr id="rule2" style="width:100%"></hr>
<footer><h4>my app 2018-19.</h4></footer>
</body>
</html>
Create a web application which will display a Home page with different menu items.
1) The Customer Listing screen should display list of customers in table format.
ANSWER
<html>
<head>
<title>Question3</title>
</head>
<body>
<h2>customer listing</h2>
<table id="custList" style="border:1px; width:80%; text-align:center">
<tr style="background-color:#42AAF4">
<th>Customer Id</th>
<th>Name</th>
<th>Gender</th>
<th>City</th>
</tr>
<tr>
<td>100001</td>
<td>Akshay Kumar</td>
<td>Male</td>
<td>Chennai</td>
</tr>
<tr>
<td>100002</td>
<td>Shyama P</td>
<td>Female</td>
<td>Trivandrum</td>
</tr>
<tr>
<td>100003</td>
<td>Nalini Kumari</td>
<td>Female</td>
<td>Bangalore</td>
</tr>
<tr>
<td>100004</td>
<td>Raj Shyam</td>
<td>Male</td>
<td>Chennai</td>
</tr>
<tr>
<td>100005</td>
<td>Sundar G</td>
<td>Male</td>
<td>Mangalore</td>
</tr>
<tr>
<td>100006</td>
<td>Kishore P</td>
<td>Male</td>
<td>Calicut</td>
</tr>
<!-- Design & Develop your code here -->
</body>
</html>
Label Control
Add Submit
Cancel Reset
3) Create a text box for reading the value for Book Id, the text box name should be "bookId".
4) Create a text box for reading the value for Book Name, the text box name should be
"bookName".
5) The Category drop down consist of following values [ Action, Drama, Comedy, Childrens ]
with id as "category".
6) The radio button have following value [ Available, Not Available ] with name as
"availability".
7) Upon clicking the [Cancel] button the contents in the form need to be reset. The Cancel button
should be named as "cancel".
8) The Add button should be named as "add".
9) Both the buttons (Add as well as Cancel) should have the background color as #2345E4.
ANSWER
<html>
<head>
<title>Question4</title>
<body>
<h2>Add Book</h2>
<form name="addBook">
Book Id<input type="text" name="bookId"></br>
Book Name<input type="text" name="bookName"></br>
Category<select id="category">
<option value="Action">Action</option>
<option value="Drama">Drama</option>
<option value="Comedy">Comedy</option>
<option value="Childrens">Childrens</option></select></br>
Available<input type="radio" name="availability">Available<input type="radio"
name="availability">Not Available</br>
<input type="reset" name="reset" placeholder="cancel" style="Background-color: #2345E4">
<input type="submit" name="submit" placeholder="add" style="Background-color: #2345E4">
</body> </html>
5. CUSTOMER REGISTRATION WITH VALIDATION
Instruction
The Customer Registration form with following attributes and its validations.
Label Control
Create Submit
Cancel Reset
4) Create a text box for reading the value for Customer Id, the text box name should be
"customerId".
5) Create a text box for reading the value for Customer Name, the text box name should be
"customerName".
6) The City drop down consist of following values [ Chennai, Mumbai, Delhi, Trivandrum ] with
id as "city".
7) The Gender radio button have following value [ Male, Female ] with name as "gender".
8) Upon clicking the [Cancel] button the contents in the form need to be reset. The Cancel button
should be named as "cancel".
10) Both the buttons (Add as well as Cancel) should have the background color as #2345E4.
NB: Don't use javascript validation, instead use the built in form level validations.
ANSWER
<html>
<head>
<title>Question5</title>
<body>
<h1>Customer Registration</h1>
<form name="registerCustomer" id="registerCustomer">
Customer Id<input type="text" name="customerId" maxlength="6" required></br>
Customer Name<input type="text" name="customerName" required></br>
City<select id="city" required>
<option value="Chennai">Chennai</option>
<option value="Mumbai">Mumbai</option>
<option value="Delhi">Delhi</option>
<option value="Trivandrum">Trivandrum</option></select></br>
Gender<input type="radio" name="gender" required>Male<input type="radio"
name="gender">Female</br>
<input type="reset" name="reset" placeholder="cancel" style="Background-color: #2345E4">
<input type="submit" name="submit" placeholder="create" style="Background-color: #2345E4">
</body>
</html>
6. CUSTOMER CART
Instruction
Create a web application which will display the cart of the customer.
1. There should be header for the application in h1 ie; 'Uni Sales'. This need to be
implemented in a div with id="header"
2. All the cart details need to be displayed in another div with id="body".
3. The cart should have a header called "My Cart" in h2
4. The cart consist of two products which is already added.
5. It will show the Product Name, Description, Unit Price, Quantity and Total in the cart (in
a table).
6. The table should have an id="myCarts" and following attributes; align=center,
width=80%.
7. The header details of the table should have background color = #45E078.
1. It will also provide two button "Continue Shopping" (id='continue') and "Checkout"
(id='checkout'). Both the buttons should have back ground color=#FF0000.
2. There should be a footer for the Mycart as "(c) All rights reserved to Uni Sales 2018-19."
in h4. The footer section need to be displayed in div with id="footer".