F 910
F 910
AIM:
c. Show all the related information when the hot spots are clicked.
DESCRIPTION:
SOURCE CODE:
<!DOCTYPE html>
<html>
<head>
<title>INDIA MAP</title>
</head>
<body>
</map>
</body>
</html>
OUTPUT:
RESULT:
DESCRIPTION:
CSS is used to apply the style in the web page which is made up of HTML
elements. It describes
o Inline CSS: Define CSS properties using style attribute in the HTML
elements.
o External CSS: Define all CSS property in a separate .css file, and then
include the file with
1) Inline CSS:
Inline CSS is used to apply CSS in a single element. It can apply style
uniquely in each element.
To apply inline CSS, you need to use style attributes within HTML element.
We can use as many
2) Internal CSS:
We can use internal CSS to apply a style for a single HTML page.
3) External CSS:
An external CSS contains a separate CSS file which only contains style
code using the class
name, id name, tag name, etc. We can use this CSS file in any HTML file
by including it in
If we have multiple HTML pages for an application and which use similar
CSS, then we can use
external CSS.
o Create a CSS file and save it using the .css extension (This file only will
only contain the styling
code.)
o Link the CSS file in your HTML file using tag in header section of HTML
document.
SOURCE CODE:
Index.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
Style.css:
body{
background-color:lavender;
text-align:center;
h2{
font-style:italic;
size:30px;
color:#f08080;
p{
font-size:20px;
.blue{
color:blue;
.red{
color:red;
.green{
color:green
OUTPUT:
RESULT:
Hence the output for the sample code using basic HTML tags has been
displayed
EX.NO. 10
DEVELOPING DYNAMIC WEB APPLICATION USING HTML, CSS AND
JAVASCRIPT
AIM:
DESCRIPTION:
Step1: Create a HTML, CSS and JavaScript files and link them using style
tag and script tag
Respectively.
Step 2:
Element function and create li, div, button and equate it to the above
variables.
Step 6: Now manipulate it such that when user clicks enter the input get
displayed as list and when we
click on the element then we should strike the list and when we click the
button the entire element gets
Step 7: Create two input boxes such that we could select colors in it.
Step 8: Now manipulate it such that when we change colors then the
linear gradient of the background
changes.
SOURCE CODE:
Homepage.html
<!DOCTYPE html>
<html>
<head>
<title>Javascript + DOM</title>
</head>
<body>
<h1>Shopping List</h1>
<div class="button-container">
</div>
<button id="enter">Enter</button>
<ul id="todo">
</ul>
<h3> </h3>
</body>
</html>
CSS:
Style.css
*{
font-size: medium;
}
body{
margin-left: 40%;
h1{
font-size: 32px;
.coolTitle {
text-align: center;
font-size: 40px;
transform: skewY(-10deg);
letter-spacing: 4px;
word-spacing: -8px;
color: tomato;
text-shadow:
.done {
text-decoration: line-through;
}
li{
font-size: larger;
.button-container{
display: flex;
gap:20px;
.top{
font-size: 15px;
background-color: green;
color: #f5f5f6;
border:0;
border-radius: 20px;
.top:hover{
background-color:red;
.flex{
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-top: 10px;
margin-bottom: 10px;
.buttons {
margin-left: 10px;
border:0;
border-radius: 20px;
background-color: green;
color: #f5f5f6;
.buttons:hover{
background-color:red;
.col{
margin: 10px;
h3{
color: #f5f5f6;
JAVASCRIPT
Script.js
let h1 = document.querySelector("h1");
let inc=document.querySelector("#inc");
let s = 32;
function SizeIncrement(){
s+=2;
h1.style.fontSize=s+"px";
function SizeDecrement(){
s-=2;
h1.style.fontSize=s+"px";
inc.addEventListener("click", SizeIncrement);
dec.addEventListener("click", SizeDecrement);
let btn=document.querySelector("#enter");
let input=document.querySelector("#input");
let ul=document.querySelector("#todo");
function checkLength(){
return input.value.length;
function Adder(){
var templi=document.createElement("li");
var tempbtn=document.createElement("button");
var tempdiv=document.createElement("div");
tempbtn.classList.add("buttons");
tempdiv.classList.add("flex");
templi.classList.add("lii");
templi.appendChild(document.createTextNode(input.value));
tempbtn.innerHTML="delete";
ul.appendChild(tempdiv);
tempdiv.append(templi,tempbtn);
input.value="";
function AddByClick(){
if(checkLength()>0){
Adder();
function AddByPress(event){
if(checkLength()>0 &&event.which===13){
Adder();
}
function deleted(element){
if(element.target.className==="buttons")
element.target.parentElement.remove();
var con=1;
function done(element){
if(element.target.className==="lii"&&con==1)
element.target.classList.add("done");
con = 0;
else if(element.target.className==="lii"&&con==0)
element.target.classList.remove("done");
con = 1;
function Checker(element){
deleted(element);
done(element);
btn.addEventListener("click",AddByClick);
input.addEventListener("keypress",AddByPress);
ul.addEventListener("click",Checker);
let p=document.querySelector("h3");
function ColorOneChanger(){
body.style.backgroundImage="linear-gradient(to
right,"+c1.value+","+c2.value+")";
// p.innerHTML= c1.value+","+c2.value;
p.textContent = c1.value+","+c2.value; }
function ColorTwoChanger(){
body.style.backgroundImage="linear-gradient(to
right,"+c1.value+","+c2.value+")" }
c1.addEventListener("input",ColorOneChanger);
c2.addEventListener("input",ColorTwoChanger);
OUTPUT:
RESULT: