Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

Thursday, 4 February 2021

Write HTML code to display a text Welcome to online exam 2020"having font size 30 and font colour green using only CSS

 Write HTML code to display a text Welcome to online exam 2020"having font size 30 and font colour green using only CSS

this problems is so simple you can solve it in many ways in html programming

here we give some example try any one 

example no.1

<html>

<head>

<title>Welcome to online exam 2020</title>

<style>

#newtext

{

color:green;

font-size:30px;

}


</style>

<body>

<h1 id="newtext">Welcome to online exam 2020</h1>

</body>

</html>

</head>


example 2

<html>
<head>
<title>Welcome to online exam 2020</title>
<style>
#newtext
{
color:green;
font-size:30px;
}

</style>
<body>
<div id="newtext">Welcome to online exam 2020</div>
</body>
</html>
</head>

Wednesday, 27 January 2021

free downloads yellow color Responsive menu source code



 free downloads yellow color Responsive menu source code

downloads menu with following features

background color web page = pink

active menu color=yellow

active menu text color=white

default menu text color=yellow

default menu background color=black

navigation menu background color=brown

you can use these menu need you can downloads font-awesome.min.css  and save same directory where save html code 

or lik font-awesome.min.css by url .

free yellow Responsive menu HTML source code?

<html>

<head>

<title> menu yellow color responsive</title>

<link rel="stylesheet" href="font-awesome.min.css">

<link rel="stylesheet" href="my.css">


</head>

<body bgcolor="pink">


<div class="topnav" id="myTopnav">

  <a href="#home" class="active">Home</a>

  <a href="#news">News</a>

  <a href="#contact">Contact</a>

  <a href="#about">About</a>

  <a href="javascript:void(0);" class="icon" onclick="myFunction()">

    <i class="fa fa-bars"></i>

  </a>

</div>


<div style="padding-left:16px">

  <h2>Responsive Topnav Example</h2>

  <p>Resize the browser window to see how it works.</p>

</div>


<script>

function myFunction() {

  var x = document.getElementById("myTopnav");

  if (x.className === "topnav") {

    x.className += " responsive";

  } else {

    x.className = "topnav";

  }

}

</script>

</body>

</html>

free yellow Responsive menu css source code?

my.css

.topnav {

  background-color: #333;

  overflow: hidden;

}



.topnav a {

  float: left;

  display: yellow;

  color: yellow;

  text-align: center;

  padding: 14px 16px;

  text-decoration: none;

  font-size: 17px;

}



.topnav a:hover {

  background-color: brown;

  color: black;

}



.topnav a.active {

  background-color: yellow;

  color: white;

}



.topnav .icon {

  display: none;

}


@media screen and (max-width: 600px) {

  .topnav a:not(:first-child) {display: none;}

  .topnav a.icon {

    float: right;

    display: block;

  }

}



@media screen and (max-width: 600px) {

  .topnav.responsive {position: relative;}

  .topnav.responsive a.icon {

    position: absolute;

    right: 0;

    top: 0;

  }

  .topnav.responsive a {

    float: none;

    display: block;

    text-align: left;

  }

}

output



what is vertical menu and how create vertical menu from CSS without using ul tags

 when any one start creating websites then firstly need a menu now it is most important you learn some
Technic to creating menu for websites,if all menu work smoothly and show properly then your websites count as a good website.

In this post we learn as given topics.

(a) what is the use of menu in any website.

(b)what is menu.

(c) what places in it field where needs menus.

(d)how create menu without using <ul> tags.

(e)what basic technology using to creating in website menus.

(f)you see whole source code of vertical menus.

(g)conclusion.

(a)What is the use of menu in any website?

when any person visiting or suffering any website then he sees firstly home page of these website.

At the home page included most imported hyperlinks of website content. Every website 

has more than more information and divided in subtopics for users understanding. Like

under the home pages several links and under about page include about company mythology

and targets and under contacts fill query for contenting websites owners and under service

page include what types of sever ice provided by company or websites.it is depending upon type of

websites.

menu is using to jumping at the related pages information like when click at services then find all

information about provided services by websites.one websites has more than one menu. Number 

menus do not fix it is depending on websites.

(b)what is menu?

menus are two types (I)software application menu (ii)websites or web application menu

software application menus are basic menus like file menu, edit menu, format menu, view menu, help menu etc.

website menus are use as hyperlinks that connected one web page to another web pages.

(c)what places in it field where needs menus?

menus are using at two places one is using in the software application programs and second is using in the websites or web application programs.

(d)how create menu without using <ul> tags?

Generally, when creating website menu then using unordered list tags and formatted by css. mostly website designer using <ul> tag to creating 

menu but sometimes you use <div> tag in creating menu. If you want to creating vertical and beautiful menu, then use <div> tag.

(e)what basic technology using to creating in website menus?

In website menu creation using HTML and CSS technology, now if you learnt creating menu then first need you learn 

HTML and CSS.

(f)you see whole source code of vertical menus?

<html>

<head>

<title> vertical menu</title>

<style>


.vertical-menu a {

  background-color:white; /* white background color */

  color: brown; /* brown text color */

  display: block; /* Make the links appear below each other */

  padding: 14px; /* Add some padding */

  text-decoration: none; /* Remove underline from links */

}


.vertical-menu a:hover {

  background-color: silver; /* silver background on mouse-over */

}


.vertical-menu a.active {

  background-color:pink; /* Add a pink color to the "active/current" link */

  color: white;

}

.vertical-menu {

  width: 250px;

  height: 300px;

  overflow-y: auto;

}

</style>

</head>

<body bgcolor="green">

<div class="vertical-menu">

  <a href="#" class="active">Home</a>

  <a href="#">product</a>

  <a href="#">services</a>

  <a href="#">about</a>

  <a href="#">contact us</a>

</div>

</body>

</html>

output:



(g)conclusion.

copy code and paste in html editor programs and save with .html extension and test out put or you can 

use in you website application programs this a very simple and knowledge full post for you please share with

your friends for growing this blogs. write comments and share your question .



Tuesday, 26 January 2021

HTML scientific calculator front end tool and back end tools

 HTML scientific calculator front end tool and back end tools

In this post we learn how to make  calculator form HTML and CSS ,generally 

calculator are two types one is the simple calculator and other is scientific calculator.

simple calculator

a simple calculator only doing some arithmetic function like addition,subtraction,

multiplication ,percentage ,and dividation etc.

scientific calculator

scientific calculator doing arithmetic function also scientific calculator doing

some other function like logarithm, exponential value ,cas ,tan ,and radius and

many more function depending on scientific calculator devices.

front end tool of scientific calculator means what is the structure of calculator and

what type of it front screen where you works and back end tools how to completed 

it operation like  Square root,Percentage,Factorial,Constants (pie, Euler constant, log, base e, log 10 base e),

Exponent log base 2, 10, e,Power Sin, Tan, Cos (enter angle in radians ) etc.

simple calculator html and js source code.

<html>
<head>
<title>simple calculater html and js code</title>
<script>
//function for displaying values
function dis(val)
{
document.getElementById("edu").value+=val
 }
//function for evaluation
function solve()
{
let x = document.getElementById("edu").value
let y = eval(x)
document.getElementById("edu").value = y
}
//function for clearing the display
function clr()
{
document.getElementById("edu").value = ""
}
</script>
</head>
<body bgcolor="silver">
 <center>

<table border="2" bordercolor="blue">
<tr>
<td><input type="button" value="c" onclick="clr()"/ style="width:50px;background:brown; height:50px;"> </td>
<td colspan="3"><input type="text" id="edu"/  style="width:100%;background:yellow; height:50px;"></td>
<!-- clr() function will call clr to clear all value -->
</tr>
<tr>
<!-- creating buttons and assigning values-->
<td><input type="button" value="+"  onclick="dis('+')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="1" onclick="dis('1')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="2" onclick="dis('2')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="3" onclick="dis('3')" style="width:100%;background:brown; height:50px;"/> </td>
</tr>
<tr>
<td><input type="button" value="-" onclick="dis('-')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="4" onclick="dis('4')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="5" onclick="dis('5')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="6" onclick="dis('6')" style="width:100%;background:brown; height:50px;"/> </td>
</tr>
<tr>
<td><input type="button" value="*" onclick="dis('*')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="7" onclick="dis('7')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="8" onclick="dis('8')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="9" onclick="dis('9')" style="width:100%;background:brown; height:50px;"/> </td>
</tr>
<tr>
<td><input type="button" value="/" onclick="dis('/')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="." onclick="dis('.')" style="width:100%;background:brown; height:50px;"/> </td>
<td><input type="button" value="0" onclick="dis('0')" style="width:100%;background:brown; height:50px;"/> </td>
<!-- Evaluating function call eval()-->
<td><input type="button" value="=" onclick="solve()" style="width:100%;background:brown; height:50px;"/> </td>
</tr>
</table>
</center>
</body>
</html>
output  as like image.




scientific calculator html css and js source code

<!DOCTYPE html> 
<html> 
<head> 
<title> Scientific Calculator using HTML, CSS and Js </title> 
<!-- CSS property to create interactive 
calculator interface -->
<style> 
#btn { 
width: 100%; 
height: 40px; 
font-size: 30px; 
input[type="button"] { 
background-color:brown; 
color: black; 
border: solid black 2px; 
width:100% 
/* Set input textarea */ 
input[type="text"] { 
background-color:yellow; 
border: solid black 2px; 
width:100% 
</style> 
<script> 
/* Creating function in HTML for backspace operation */ 
function backspace(calc) {  
size = calc.display.value.length; 
calc.display.value = calc.display.value.substring(0, size-1); 
/* Creating function to calculate factorial of element */ 
function calculate(calc) { 
/* Check if function include ! character then 
calculate factorial of number */ 
if(calc.display.value.includes("!")) { 
size = calc.display.value.length; 
n = Number(calc.display.value.substring(0, size-1)); 
f = 1; 
for(i = 2; i <= n; i++) 
f = f*i; 
calc.display.value = f; 
/* If function include % character then calculate 
the % of number */ 
else if(calc.display.value.includes("%")) { 
size = calc.display.value.length; 
n = Number(calc.display.value.substring(0, size-1)); 
calc.display.value = n/100; 

else  
/* Otherwise evalute and execute output */ 
calc.display.value = eval(calc.display.value); 
</script> 
</head> 

<body> 
<form name = "calc"> 
<table id = "calc" > 
<tr> 
<td colspan="6"><input id="btn" name="display"
onkeypress="return event.charCode >= 48 
&& event.charCode <= 57" type="text"> 
</td> 
</tr> 
<tr> 
<td><input id="btn" type="button" value="1"
OnClick="calc.display.value+='1'"> 
</td> 
<td><input id="btn" type="button" value="2"
OnClick="calc.display.value+='2'"> 
</td> 
<td><input id="btn" type="button" value="3"
OnClick="calc.display.value+='3'"> 
</td> 
<td><input id="btn" type="button" value="C"
OnClick="calc.display.value=''"> 
</td> 
<td><input id="btn" type="button" value="<-"
OnClick="backspace(this.form)"> 
</td> 
<td><input id="btn" type="button" value="="
OnClick="calculate(this.form)"> 
</td> 
</tr> 
<tr> 
<td><input id="btn" type="button" value="4"
OnClick="calc.display.value+='4'"> 
</td> 
<td><input id="btn" type="button" value="5"
OnClick="calc.display.value+='5'"> 
</td> 
<td><input id="btn" type="button" value="6"
OnClick="calc.display.value+='6'"> 
</td> 
<td><input id="btn" type="button" value="-"
OnClick="calc.display.value='-'"> 
</td> 
<td><input id="btn" type="button" value="%"
OnClick="calc.display.value+='%'"> 
</td> 
<td><input id="btn" type="button" value="cos"
OnClick="calc.display.value='Math.cos('"> 
</td> 
</tr> 
<tr> 
<td><input id="btn" type="button" value="7"
OnClick="calc.display.value+='7'"> 
</td> 
<td><input id="btn" type="button" value="8"
OnClick="calc.display.value+='8'"> 
</td> 
<td><input id="btn" type="button" value="9"
OnClick="calc.display.value+='9'"> 
</td> 
<td><input id="btn" type="button" value="*"
OnClick="calc.display.value+='*'"> 
</td> 
<td><input id="btn" type="button" value="n!"
OnClick="calc.display.value+='!'"> 
</td> 
<td><input id="btn" type="button" value="sin"
OnClick="calc.display.value='Math.sin('"> 
</td> 
</tr> 
<tr> 
<td><input id="btn" type="button" value="."
OnClick="calc.display.value+='.'"> 
</td> 
<td><input id="btn" type="button" value="0"
OnClick="calc.display.value+='0'"> 
</td> 
<td><input id="btn" type="button" value=","
OnClick="calc.display.value+=','"> 
</td> 
<td><input id="btn" type="button" value="+"
OnClick="calc.display.value+='+'"> 
</td> 
<td><input id="btn" type="button" value="/"
OnClick="calc.display.value+='/'"> 
</td> 
<td><input id="btn" type="button" value="tan"
OnClick="calc.display.value='Math.tan('"> 
</td> 
</tr> 
<tr> 
<td><input id="btn" type="button" value="E"
OnClick="calc.display.value+='Math.E'"> 
</td> 
<td><input id="btn" type="button" value="pi"
OnClick="calc.display.value+='Math.PI'"> 
</td> 
<td><input id="btn" type="button" value="^"
OnClick="calc.display.value+='Math.pow('"> 
</td> 
<td><input id="btn" type="button" value="("
OnClick="calc.display.value+='('"> 
</td> 
<td><input id="btn" type="button" value=")"
OnClick="calc.display.value+=')'"> 
</td> 
<td><input id="btn" type="button" value="log"
OnClick="calc.display.value='Math.log('"> 
</td> 
</tr> 
<tr> 
<td><input id="btn" type="button" value="sqrt"
OnClick="calc.display.value+='Math.sqrt('"> 
</td> 
<td><input id="btn" type="button" value="ln2"
OnClick="calc.display.value+='Math.LN2'"> 
</td> 
<td><input id="btn" type="button" value="ln10"
OnClick="calc.display.value+='Math.Log10'"> 
</td> 
<td><input id="btn" type="button" value="l2e"
OnClick="calc.display.value+='Math.LOG2E'"> 
</td> 
<td><input id="btn" type="button" value="l10e"
OnClick="calc.display.value+='Math.log10'"> 
</td> 
<td><input id="btn" type="button" value="exp"
OnClick="calc.display.value='Math.exp('"> 
</td> 
</tr> 
</table> 
</form> 
</body> 

</html>
output show in image