Skip to main content

How to make Calculator using HTML And CSS : Source Code

Tutorial 6

How to make Calculator using HTML And CSS || Web Tutorials : Source Code

  Hey Guys , Welcome To My Blog :-  Web Tutorials || Yuvan Art

Full Process To Create Styles Calculator :- Click On The Below Link To Watch Full Process To Make Calculator Using HTML And CSS.



Part ( 1 ) HTML 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>CALCULATOR</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div align="center">
        <h1>CALCULATOR</h1>
        <div class="details">
            <form name="forms">
                <div class="calc">
                    <input type="text" name="screen" id="display" placeholder="0" readonly>
                    <br>
                    <input type="button" value=" AC " onclick="forms.screen.value =''">
                    <input type="button" value="DEL" onclick="forms.screen.value = forms.screen.value.substr(0forms.screen.value.length -1)">
                    <input type="button" value=" % " onclick="forms.screen.value+='%'">
                    <input type="button" value=" / " onclick="forms.screen.value+='/'">
                    <br>
                    <input type="button" value=" 1 " onclick="forms.screen.value+='1'">
                    <input type="button" value=" 2 " onclick="forms.screen.value+='2'">
                    <input type="button" value=" 3 " onclick="forms.screen.value+='3'">
                    <input type="button" value=" * " onclick="forms.screen.value+='*'">
                    <br>
                    <input type="button" value=" 4 " onclick="forms.screen.value+='4'">
                    <input type="button" value=" 5 " onclick="forms.screen.value+='5'">
                    <input type="button" value=" 6 " onclick="forms.screen.value+='6'">
                    <input type="button" value=" - " onclick="forms.screen.value+='-'">
                    <br>
                    <input type="button" value=" 7 " onclick="forms.screen.value+='7'">
                    <input type="button" value=" 8 " onclick="forms.screen.value+='8'">
                    <input type="button" value=" 9 " onclick="forms.screen.value+='9'">
                    <input type="button" value=" + " onclick="forms.screen.value+='+'">
                    <br>
                    <input type="button" value=" 0 " onclick="forms.screen.value+='0'">
                    <input type="button" value=" 00 " onclick="forms.screen.value+='00'">
                    <input type="button" value=" . " onclick="forms.screen.value+='.'">
                    <input type="button" value=" = " onclick="forms.screen.value = eval(forms.screen.value)">
                </div>
            </form>
        </div>
        <h2>CREATED BY WEB TUTORIALS</h2>
    </div>
</body>
</html>

Part ( 2 ) CSS Code :- 

h1{
    text-shadow2px 2px 1px grey;
    font-styleoblique;
    font-weight800;
    padding2px;
    width380px;
    border-radius13px;
    box-shadowinset 5px 5px 3px greyinset -5px -5px 3px grey;
}
h2{
    text-shadow2px 2px 1px grey;
    font-styleoblique;
    font-weight600;
    padding2px;
    width380px;
    border-radius13px;
    box-shadowinset 3px 3px 1px greyinset -3px -3px 1px grey;
}
#display{
    text-alignright;
    margin20px 10px 20px 10px;
    width340px;
    box-shadowinset 5px 5px 3px greyinset -5px -5px 3px white;
    border-radius13px;
}
.details{
    backgroundrgba(200200200);
    padding10px;
    displayinline-block;
    border-radius20px;
}
input{
    font-size30px;
    font-familybold;
    width70px;
    height60px;
    margin8px;
    border-radius20px;
    bordernone;
    cursorpointer;
    box-shadow5px 5px 3px grey-5px -5px 3px white;
    backgroundrgba(200200200);
    outlinenone;
}
h1:hover{
    text-shadow2px 2px 1px gray;
    box-shadowinset 5px 5px 3px blackinset -5px -5px 3px black;
}
h2:hover{
    box-shadowinset 3px 3px 1px blackinset -3px -3px 1px black;
}
input:hover{
    box-shadowinset 5px 5px 3px greyinset -5px -5px 3px white;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
}

Thank You !!!

Visit More Tutorials :- 







Comments

Popular posts from this blog

CSS Neon Button with Hover effects using Html and CSS : Source Code

   Tutorial 3 CSS Neon Button with Hover effects using Html and CSS || Web Tutorials : Source Code   Hey Guys , Welcome To My Blog :-  Web Tutorials || Yuvan Art Full Process To Create Styles Button :-  Click On The Below Link To Watch Full Process To Create CSS Neon Button with hover effects using Html and CSS . CSS Neon Button effect on hover using HTML & CSS || CSS Glowing button effects || Web Tutorials Part ( 1 ) HTML Code :-  <!-- CSS Neon Button With Hover Effect - HTML Part --> <! 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" >      < tit...

Styles Table with awesome Hover effect using HTML And CSS : Source Code

  Tutorial 8 Styles Table with awesome Hover effect using HTML And CSS || Web Tutorials : Source Code   Hey Guys , Welcome To My Blog :-   Web Tutorials || Yuvan Art Full Process To Create Styles Table :-  Click On The Below Link To Watch Full Process To Make Styles Table Using HTML And CSS. Styles Table with awesome Hover effect using HTML And CSS || Web Tutorials : Source Code Part ( 1 ) HTML 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 > Styling Table </ title >      < link   rel = "stylesheet"   href = "style.css" > </ head > ...

How to Create Simple Login Form using HTML and CSS : Source Code

  Tutorial 4 How to Create Simple Login Form using HTML and CSS - Web Tutorials || Make Login Form : Source Code   Hey Guys , Welcome To My Blog :-  Web Tutorials || Yuvan Art Full Process To Create Styles Login Form :-  Click On The Below Link To Watch Full Process To Create Simple Login Form Using HTML And CSS. How to Create Simple Login Form using HTML and CSS - Web Tutorials || Make Login Form Part ( 1 ) HTML Code :-  <!-- Simple Login Form - HTML Part --> <! 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 > Login Form </ title >    ...