Google clone using HTML and CSS

Image
Program : <html> <!--head section start--> <head> <title>Google</title> <style> span{border-bottom:2px solid royalblue; color:royalblue; border-padding:60px; padding-bottom:10px; } img{position:absolute; left:79px; top:85px; } input{position:absolute; top:189px; height:40px; width:80%; border-radius:80px; border-width:1px; border-style:solid; border-color:darkgray; } .button{background-image:url(/storage/emulated/0/aap/search.jpg); background-size:100% 100%; height:44px; width:70px; position:absolute; top:186px; left:275px; border-color:white; } .button1{background-image:url(/storage/emulated/0/aap/Weather.jpg); position:absolute; top:242px; height:100px; width:100px; background-size:100% 100%; border-color:transparent; } .button2{background-image:url(/storage/emulated/0/aap/Sports.jpg); position:absolute; top:237px; left:80px; height:100px; width:100px; background-size:100% 100%; border-color:transparent; } .button3{background-image:url(/storag

Html calculator script

Here we can create calculator using html.
The code for calculator is given below:

<!DOCTYPE html>
<html>
    <head>
        <title>calculator</title>
        <style>
            body{
                background:skyblue;
            }
            *{
                box-sizing:border-box;
                -webkit-box-sizing:border-box;
                -moz-box-sizing:border-box;
            }
            .wrap{
                width:350px;
                margin:auto;
                height:auto;
                background:black;
                padding:15x;
            }
            input[type=text]{
                width:90%;
                padding:10px;
                font-size:22px;
                font-weight:bold;
                margin-top:20px;
                border-radius:5px;
            }
            input[type=button]{
                width:75px;
                padding:10px;
                font-size:22px;
                font-weight:bold;
                border-radius:15px;
               
            }
            #del{
                width:90%;
            }
        </style>
      </head>
    <body>
        <div class="wrap">
            <form name="cal">
                <input type="text"name="display">
                <br><br>
                <input type="button"value="9" onclick="cal.display.value+='9'">
               
                <input type="button"value="8" onclick="cal.display.value+='8'">
                <input type="button"value="7" onclick="cal.display.value+='7'">
                <input type="button"value="+" onclick="cal.display.value+='+'">
                <br><br>
                <input type="button"value="6" onclick="cal.display.value+='6'">
               
                <input type="button"value="5" onclick="cal.display.value+='5'">
                <input type="button"value="4" onclick="cal.display.value+='4'">
                <input type="button"value="-" onclick="cal.display.value+='-'">
                <br><br>
                <input type="button"value="3" onclick="cal.display.value+='3'">
               
                <input type="button"value="2" onclick="cal.display.value+='2'">
                <input type="button"value="1" onclick="cal.display.value+='1'">
                <input type="button"value="*" onclick="cal.display.value+='*'">
                <br><br>  
                <input type="button"value="0" onclick="cal.display.value+='0'">
               
                <input type="button"value="/" onclick="cal.display.value+='/'">
                <input type="button"value="%" onclick="cal.display.value+='%'">
                <input type="button"value="=" onclick="cal.display.value=eval(cal.display.value)">
                <br><br>
                <input type="button"value="delete" onclick="cal.display.value=''"id="del">                                          
                </form>
        </div>
    </body>
</html>

Output:

You can also check out my previous post for the output.

                                                        By:~AA


Comments

Post a Comment

Popular posts from this blog

Google clone using HTML and CSS

BOOK WEBPAGE

HTML Table