WT 1 Assignment
WT 1 Assignment
**********************************************************************************
Code –
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!--<frameset rows = "20%, 60%, 20%">
<frame name = "top" src =
"C:/Users/dharam/Desktop/attr1.png" />
<frame name = "main" src =
"C:/Users/dharam/Desktop/gradient3.png" />
<frame name = "bottom" src =
"C:/Users/dharam/Desktop/col_last.png" />
<noframes>
<body>The browser you are working does
not support frames.</body>
</noframes>
</frameset>-->
<iframe src="p.html" height='300px'
width="500px">Hello</iframe>
</body>
</html>
Output –
Question 2. Create an HTML document that describes
nested ordered lists of cars. The outer list must have three
entries: compact, midsize and sports. Inside each of these
lists there must be two sub-lists of body styles. The compact
and midsize car sub-lists are two doors and four doors; the
sports car sublists are coupe and convertible. Each body
style sub-list must have at least three entries, each of which
is the make and model of a particular car that fits the
category. The outer list must use uppercase Roman
numerals, the middle lists must use uppercase letters, and
the inner lists must use Arabic numerals. The background
color for the compact car list must be pink; for the mid-size
car list, it must be blue; for the sports car list, it must be
red. All of the styles must be in a document style sheet.
Code –
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.outlist1 {
background-color:green;
list-style-type:upper-roman;
}
.outlist2 {
background-color:blue;
list-style-type:upper-roman;
}
.outlist3 {
background-color:red;
list-style-type:upper-roman;
}
.midlist {
list-style-type:upper-alpha;
}
.innerlist {
list-style-type:decimal;
}
</style>
</head>
<body>
<ol>
<li class="outlist1">compact
<ol class="midlist">
<li>two door
<ol class="innerlist">
<li>2005 Toyota Tacoma</li>
<li>2005 Dodge Dakota </li>
<li>2005 Ford F-150</li>
</ol>
</li>
<li>four door
<ol class="innerlist">
<li>2005 Dodge Magnum </li>
<li>2005 Audi A4 </li>
<li>2005 Mercedes-Benz E-Class
</li>
</ol>
</li>
</ol><br />
</li>
<li class="outlist2">midsize
<ol class="midlist">
<li>two door
<ol class="innerlist">
<li>2005 Lincoln LS</li>
<li>2005 Lexus LX 470 </li>
<li>2005 Chrysler Sebring </li>
</ol>
</li>
<li>four door
<ol class="innerlist">
<li>2005 Toyota Sienna </li>
<li>2005 Kia Sedona </li>
<li>2005 Nissan Quest</li>
</ol>
</li>
</ol><br />
</li>
<li class="outlist3">sports
<ol class="midlist">
<li>coupe
<ol class="innerlist">
<li>2005 Chevrolet Corvette </li>
<li>2005 Mercedes-Benz CL-Class
</li>
<li>2005 Mazda RX-8</li>
</ol>
</li>
<li>convertible
<ol class="innerlist">
<li>2005 Mercedes-Benz SL-Class
</li>
<li>2005 BMW 6 Series</li>
<li>2005 Chevrolet Corvette </li>
</ol>
</li>
</ol><br />
</li>
</ol>
</body>
</html>
Output –
<label>
Course :
</label>
<select>
<option value="Course">Course</option>
<option value="BCA">BCA</option>
<option value="BBA">BBA</option>
<option value="B.Tech">B.Tech</option>
<option value="MBA">MBA</option>
<option value="MCA">MCA</option>
<option value="M.Tech">M.Tech</option>
</select>
<br>
<br>
<label>
Gender :
</label><br>
<form action="">
<input type="radio" name="gender"
value="male">Male<br>
<input type="radio" name="gender"
value="female">Female<br>
<input type="radio" name="gender"
value="other">Other<br>
<br>
</form>
<label>
Phone :
</label>
<input type="text" name="country code"
value="+91" size="2"/>
<input type="text" name="phone" size="10"/> <br>
<br>
Address
<br>
<textarea cols="50" rows="5" value="address">
</textarea>
<br> <br>
Email:
<input type="email" id="email" name="email"/>
<br>
<br>
Password:
<input type = "password" name = "pswd1"> <br>
<br>
Re-type password:
<input type = "password" name = "pswd2"> <br>
<body>
</body>
</html>
mystyle.css
body
h1 {
color: green;
}
p{
font-size: 14px;
color: blue;
}
Output –
Question 5. Create an inline CSS that changes the font color
of the h1 heading by setting the color property to blue with
center aligned And internal DTD for the Library Information
like Book Name, Author Name, Publication and Year of
Publication.
a. Ensure its validity
b. Then try to break it
Code –
<html>
<head>
<center><title>Library Information</title>
</head>
<body>
<?xml version="1.0"?>
<!DOCTYPE note [
<!ELEMENT information (book name,author
name,publication,year of publication)>
<!ELEMENT book name (#PCDATA)>
<!ELEMENT author name (#PCDATA)>
<!ELEMENT publication (#PCDATA)>
<!ELEMENT year of publication (#PCDATA)>
]>
<information>
<br></br>
<book name>power of habit</book name>
<br></br>
<author name>charles duhigg</author name>
<br></br>
<publication>XYZ</publication>
<br></br>
<year of publication>2012</year of publication>
</information>
</body>
</html>
Output –