Ticker

6/recent/ticker-posts

Header Ads Widget

Responsive Advertisement

Basic CSS syntax




 <!DOCTYPE html>

<html>

<head>

<title>Sign in to my Web page</title>

<script>

function checkfield(){

var name="Farwah";

var password="123";

var uname=document.getElementById("text1").value;

var pass=document.getElementById("text2").value;

if(uname == name){

if(password == pass){

alert("You are successfully signed in!");

}}

else{

alert("Incorrect Username or Password!");

}

}

</script>

<style type ="text/css">

p.regular {color:blue;font-size:100%;}

p.medium {color:green;font-size:150%;}

</style>

</head>


<body>

<p class= "regular">This is test of regular</p>

<p class="medium">This is test of medium</p>

<img src = "download.png"/>

<br>

<input id="text1" type="text" placeholder = "Enter Username"/>

<br><br>

<input id="text2" type="password" placeholder="Enter Password">

<br>

<br>

<button onClick = "checkfield();"><b>Sign In</b></button>

</body>

</html>

Post a Comment

0 Comments