Gadgets

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

Thursday, 19 November 2015

Include one HTML file into other HTML file

Include one HTML file into other HTML file 
We have different ways to include one html file into other html page, using 
1.            <frame>
2.            <iframe>
3.            <java script>. we have different ways in java script.

if we use <frame> and <iframe> to include one html file into other html file, that web page shows border lines for each html file and it look like separate pages.  
Here is the simple way to include one html file into other html file by using javascript. 
Using <frame>: 
Here I taken 4 HTML files
header.html, body.html, footer.html
I included above three html files into home.html 
<html>
    <frameset rows="50px,150px,50px">
        <frame src="header.html"/>
        <frame src="body.html"/>
        <frame src="footer.html"/>
    </frameset>   
</html> 

Output for above example:
 Using javascript: 
Here I taken 3 html files: header.html, body.html, footer.html
I included header.html and footer.html files into body.html file.

       <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
Above link is required 
Javascript code for include html file
        <script>
             $(function(){
        $("#headerContent").load("header.html");
        $("#footerContent").load("footer.html"); 
    });
        </script>
<div id="headerContent"></div>
<div id="footerContent"></div>
 Header.html 
<html>   
    <body>       
       <h1>Welcome to Hyderabad</h1>
        <h3> HOME | ABOUTUS | SERVICES | VISIT PLACES | CAREER | CONTACT </h3>       
    </body>
</html> 
 Footer.html 
<html>   
    <body>
              <h1>Thank you, visit  again</h1>       
    </body>
</html>  
Body.html
<html>
    <head>
       <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script>
             $(function(){
        $("#headerContent").load("header.html");
        $("#footerContent").load("footer.html"); 
    });
        </script>        
    </head>
    <body>
        <div id="headerContent"></div>        
        <h1>Tourist Places</h1>
        <p>1. Charminar</p>
        <p>2. Hussain sagar</p>
        <p>3. Birla mandir</p>
        <p>4. Ramoji film city</p>
        <p>5. Golconda fort</p>       
        <div id="footerContent"></div>
    </body>
</html>
Output for above example:


Monday, 29 December 2014

HTML Login form with validation



HTML Login form with validation
In this article I explained that, HTML Login form with client side validation. Here in this form I taken email id and password, in this form we should give the correct email id pattern otherwise it will not take wrong email id pattern and here I taken password pattern, that password should be  a-z,A-Z,0-9 and password length is between 8 to 30 letters.



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form action="" method="post">
<table align="center">
<tr><td>Email id :</td><td><input type="email"name="eid" pattern="^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$" tabindex="1"required /></td></tr>
<tr><td>Password :</td><td><input type="password"name="psw" tabindex="2" pattern="[a-zA-Z0-9 ]{8,30}"required/></td></tr>
<tr><td></td><td><input type="submit" value="SignIn"tabindex="3"/></td></tr>
</table>
</form>
</body>
</html>
Email id :
Password :

Friday, 12 September 2014

Text Style Zoom



Text Zoom:

<style>
.container{
margin:0px auto;
width: 1000px;
}
#textzoom a{
color:  #0081C2;
font-family: 'Corbel';
font-size:4em;
font-weight: bold;
text-decoration: none;
transition:all 2s ease-in-out;
}
#textzoom a:hover{
font-size:8em;
transition:all 2s ease-in-out;
}
</style>
<div class="container">
<div id="textzoom">
<a href=""> Text Zoom</a>
</div></div>

JSP Page

Text Shadow Style



Shadow Text Styles: 
<style>
.container{
margin:0px auto;
width: 1000px;
}
#shadowtext1 a{
color:  #026202;
font-family: Arial,sans-serif;
font-size: 45px;
font-weight: bold;
text-decoration:none;
text-shadow:2px 2px black;
}
#shadowtext2 a{
color:  #026202;
font-family: Arial,sans-serif;
font-size: 45px;
font-weight: bold;
text-decoration:none;
text-shadow:2px 2px 2px black;
}
#shadowtext3 a{
color:  #026202;
font-family: Arial,sans-serif;
font-size: 45px;
font-weight: bold;
text-decoration:none;
text-shadow:5px 6px 5px black;
}
.text1 a{
color:  #054d52;
text-decoration: none;
font-family: Arial,sans-serif;
font-size: 45px;
font-weight: bold;
text-shadow:0px 0px 5px #000;
}
 
</style>
<div class="container">
<hr>
<div id="shadowtext1">
<a href=""> Life Is Beautiful</a>
</div>
<hr>
<div id="shadowtext2">
<a href=""> Life Is Beautiful</a>
</div>
<hr>
<div id="shadowtext3">
<a href=""> Life Is Beautiful</a>
</div>
<hr>
<div class="text1">
<a href=""> Life Is Beautiful</a>
</div>
</div>
 

 

JSP Page