HTML
Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.
After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.\
<!DOCTYPE html>
<html>
<head>
<title>Login page</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<div class="header">
<h1>Login</h1>
</div>
<div class="main">
<form>
<span>
<input type="text" name="" placeholder="Username">
</span> <br>
<span>
<input type="password" name="" placeholder="Password">
</span> <br>
<button>Login</button>
</form>
</div>
</div>
</body>
</html>
Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser.
body{
background-image: url(bg.jpg);
background-repeat: no-repeat;
background-size: cover;
font-family: sans-serif;
overflow: hidden;
}
.container{
width: 370px;
margin: 7% auto;
border-radius: 25px;
background-color: rgba(0,0,0,0.5);
box-sizing: 0 0 17px #333;
}
.header{
text-align: center;
padding-top: 75px;
}
h1{
color: white;
font-size: 45px;
margin-bottom: 80px;
}
.main{
text-align: center;
}
input,button{
width: 300px;
height: 40px;
border:none;
outline: none;
padding-left: 40px;
box-sizing: border-box;
color: #333;
font-size: 15px;
margin-bottom: 40px;
}
button{
padding-left: 0;
background-color: #83acf1;
letter-spacing: 1px;
font-weight: bold;
margin-bottom: 70px;
}
button:hover{
box-shadow: 2px 2px 5px #555;
background-color: black;
color: white;
}
input:hover{
box-shadow: 2px 2px 5px #555;
background-color: #ddd;
}
span{
position: relative;
}
i{
position: absolute;
left: 15px;
top: 2px;
color: #333;
font-size: 16px;
}
No comments: