hi every one today i am going to start session 6 .
let us know more example of html with css
LET US see how to define & effect of css on html
now write this code in any editor & save as html or htm extension.
and open this file in browser you see output.
now let us see another exmple.
please share with your friends & all . thanks for viewing this blog. will see more detail in next session.
let us know more example of html with css
LET US see how to define & effect of css on html
<html>
<style>
.body
{
width:100;
padding:0;
margin:0;
}
.abc
{
width:100%;
color:red;
background:#eaeaea;
}
<style>
<body>
<div class="abc">hello this is an example</div>
<br/>
<span>here text sample</span>
<h2>Welocome Here</h2>
</body>
</html>
in the above exmple declare css that define style for div in which apply background color & color to div . text is looking in red color.<style>
.body
{
width:100;
padding:0;
margin:0;
}
.abc
{
width:100%;
color:red;
background:#eaeaea;
}
<style>
<body>
<div class="abc">hello this is an example</div>
<br/>
<span>here text sample</span>
<h2>Welocome Here</h2>
</body>
</html>
now write this code in any editor & save as html or htm extension.
and open this file in browser you see output.
now let us see another exmple.
<html>
<style>
.body
{
width:100;
padding:0;
margin:0;
}
#abc
{
width:100%;
color:red;
background:#eaeaea;
}
.xy
{
font-size:18px;
font-weight:bold;
box-shadow:1px 1px 1px rgba(0,0,0,0.2);
}
<style>
<body>
<div id="abc">hello this is an example</div>
<br/>
<p>hello this is just example</p>
<span>here text sample</span>
<h2>Welocome Here</h2>
<div class="xy">hi here you can learn web programing</div>
</body>
</html>
<!doctype html>
<html>
<head>
<script>
function adding(){
var a,b,c;
a=Number(document.getElementById("firstinput").value);
b=Number(document.getElementById("secondinput").value);
c= a + b;
document.getElementById("result").value= c;
}
</script>
</head>
<body>
<input id="firstinput">
<input id="secondinput">
<button onclick="add()">Add</button>
<input id="result">
</body>
</html>
<style>
.body
{
width:100;
padding:0;
margin:0;
}
#abc
{
width:100%;
color:red;
background:#eaeaea;
}
.xy
{
font-size:18px;
font-weight:bold;
box-shadow:1px 1px 1px rgba(0,0,0,0.2);
}
<style>
<body>
<div id="abc">hello this is an example</div>
<br/>
<p>hello this is just example</p>
<span>here text sample</span>
<h2>Welocome Here</h2>
<div class="xy">hi here you can learn web programing</div>
</body>
</html>
<!doctype html>
<html>
<head>
<script>
function adding(){
var a,b,c;
a=Number(document.getElementById("firstinput").value);
b=Number(document.getElementById("secondinput").value);
c= a + b;
document.getElementById("result").value= c;
}
</script>
</head>
<body>
<input id="firstinput">
<input id="secondinput">
<button onclick="add()">Add</button>
<input id="result">
</body>
</html>
please share with your friends & all . thanks for viewing this blog. will see more detail in next session.