Bootstrap snippet and html example. Login

Bootstrap 3.0.1 snippet "Login" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.

HTML code

Clean, semantic HTML that powers this Bootstrap 3.0.1 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<html>
    <head>
        <title>LogIn</title>
        
    <link rel='stylesheet' href='styles/estilos.css'>
    <link rel="icon" type="image/x-icon" href="img/bdroid.png">
	</head>
    <body>
		
        <form class='contacto'  action="ingresar.php"method="get">
		<p><h1>Ingresa Correctamente Tus Datos!</h1></p>
            <div><label>Email</label><input type='email' value='' name="email" placeholder='Tú Email@' required></div>
            <div><label>Password</label><input type='password' value='' name="clave" placeholder='Tú Password' required></div>
            
            <div><input type='submit' value='Entrar'>
			<!--
			<hr><p><a href="register.php" target="_blank"><img src="img/registrarme.PNG"><br><br>Registrarme</a>
			<hr><p><a href="inicio.php" target="_blank"><img src="img/cancelar.PNG"><br><br>Cancelar</a>
			-->
		
			<hr>	
			<br>
			<p><h1>Deseo Registrarme!</h1></p>
			<input type='button'
			value='Registrarme'
			onClick='location.href= "<?php echo "register.php"?>" ' />
			<br>
			<hr>
			<br>
			<p><h1>Cancelar Solicitud!</h1></p>
			<input type='button'
			value='Cancelar'
			onClick='location.href= "<?php echo "inicio.php"?>" ' />
			<hr>
			</div>
		</form>
    </body>
</html>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 3.0.1 to keep the design, spacing, and responsiveness consistent.

*{
    font-family: sans-serif;
    font-size: 12px;
    color: #000000;
}
body{
    width: 400px;
    
    margin: auto;
    background-color: #0066CC;
}
.contacto{
    border: 1px solid #0066CC;
    border-radius: 6px;
    padding: 45px 45px 20px;
    margin-top: 50px;
    background-color: white;
    box-shadow: 0px 5px 10px #CCCCCC, 0 0 0 10px #EEF5F7 inset;
}
.contacto label{
    display: block;
    font-weight: bold;
}
.contacto div{
    margin-bottom: 15px;
}
/* start Input text */
.contacto input[type='text'], .contacto textarea{
    padding: 7px 6px;
    width: 294px;
    border: 1px solid #0066CC;
    resize: none;
    box-shadow:0 0 0 3px #EEF5F7;
    margin: 5px 0;
}
.contacto input[type='text']:focus, .contacto textarea:focus{
    outline: none;
    box-shadow:0 0 0 3px #000000;
}

/* end Text*/

/* start password */

.contacto input[type='password'], .contacto password{
    padding: 7px 6px;
    width: 294px;
    border: 1px solid #0066CC;
    resize: none;
    box-shadow:0 0 0 3px #EEF5F7;
    margin: 5px 0;
}
.contacto input[type='password']:focus, .contacto password:focus{
    outline: none;
    box-shadow:0 0 0 3px #000000;
}
/* end password */

/* start email*/
.contacto input[type='email'], .contacto email{
    padding: 7px 6px;
    width: 294px;
    border: 1px solid #0066CC;
    resize: none;
    box-shadow:0 0 0 3px #EEF5F7;
    margin: 5px 0;
}
.contacto input[type='email']:focus, .contacto email:focus{
    outline: none;
    box-shadow:0 0 0 3px #000000;
}

/*  button */
.contacto input[type='button']{
    border: 1px solid #0066CC;
    box-shadow:0 0 0 3px #EEF5F7;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
    text-shadow: 1px 1px 0px white;
	width: 150px;
    background: #0066CC;
    background: -moz-linear-gradient(top, #e4f1f6 0%, #cfe6ef 100%);
    background: -webkit-linear-gradient(top, #e4f1f6 0%,#cfe6ef 100%);
}
.contacto input[type='button']:hover{
    background: #edfcff;
    background: -moz-linear-gradient(top, #edfcff 0%, #cfe6ef 100%);
    background: -webkit-linear-gradient(top, #edfcff 0%,#cfe6ef 100%);
}
.contacto input[type='button']:active{
    background: #cfe6ef;
    background: -moz-linear-gradient(top, #cfe6ef 0%, #edfcff 100%);
    background: -webkit-linear-gradient(top, #cfe6ef 0%,#edfcff 100%);
}





.contacto input[type='submit']{
	
    border: 1px solid #0066CC;
    box-shadow:0 0 0 3px #EEF5F7;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
    text-shadow: 1px 1px 0px white;
	width: 150px;
    background: #0066CC;
    background: -moz-linear-gradient(top, #e4f1f6 0%, #cfe6ef 100%);
    background: -webkit-linear-gradient(top, #e4f1f6 0%,#cfe6ef 100%);
}
.contacto input[type='submit']:hover{
    background: #edfcff;
    background: -moz-linear-gradient(top, #edfcff 0%, #cfe6ef 100%);
    background: -webkit-linear-gradient(top, #edfcff 0%,#cfe6ef 100%);
}
.contacto input[type='submit']:active{
    background: #cfe6ef;
    background: -moz-linear-gradient(top, #cfe6ef 0%, #edfcff 100%);
    background: -webkit-linear-gradient(top, #cfe6ef 0%,#edfcff 100%);
}

Similar snippets

Bootstrap example and template. Pricing Package Table

Pricing Package Table

Bootstrap example and template. card with followers

card with followers

Bootstrap example and template. error 500 page

error 500 page

Bootstrap example and template. Responsive UI Card

Responsive UI Card

Bootstrap example and template. bs4 cv profile

bs4 cv profile

Bootstrap example and template. team item

team item

Bootstrap example and template. product full detail

product full detail

Bootstrap example and template. Cards panels with thumbnails

Cards panels with thumbnails

FAQ

How do I use this snippet?

Include Bootstrap 3.0.1, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 3.0.1.

Bootstrap example and template. Login

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 1.6K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 3.0.1

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css'>

<script src='https://netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js'></script>

This code example is based on bootstrap 3.0.1 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working