How To Make a Full Website Using Html And CSS | Step By Step Website Tutorial
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>Full
Website Using html and css</title>
<link
rel="stylesheet" type="text/css"
href="style.css">
</head>
<body>
<div
class="main">
<div
class="over"></div>
<div
class="navi">
<nav>
<label class="logo">
<span
style="color: white">Easy</span>
<span
style="color: red">Web</span>
<span
style="color: yellow">Coding</span>
</label>
<ul>
<li><a
href="#">Home</a></li>
<li><a
href="#">Service</a></li>
<li><a
href="#">About</a></li>
<li><a
href="#">Blog</a></li>
<li><a
href="#">Contact</a></li>
</ul>
</nav>
</div>
<div
class="info">
<h4>Easy
Web Coding</h4>
<h1>Staring
A New Jarney !</h1>
<p>Lorem
ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor <br> ex ea commodo
consequat.</p>
<button
class="btn">Dwonload
Now</button>
<button
class="btn1">Learn More</button>
</div>
</div>
</body>
</html>
CSS
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.
*{
margin:0 ;
padding:0;
text-decoration: none;
list-style-type: none;
font-family:
sans-serif;
}
.main{
background:
url(bg.jpg);
background-position:
center;
background-repeat:
no-repeat;
background-size:
cover;
position: relative;
width: 100%;
height: 100vh;
}
.main .over{
background:
rgba(0,0,0,0.6);
background-size:
cover;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
}
.main .navi{
position: absolute;
height: 100px;
width: 100%;
z-index: 2;
}
.main .navi nav .logo{
font-size: 40px;
font-weight: bold;
line-height: 100px;
padding-left: 40px;
}
.main .navi nav ul{
float: right;
margin-right: 60px;
}
.main .navi nav ul li{
display: inline-block;
line-height: 100px;
font-weight: bold;
font-size: 22px;
margin: 15px;
}
.main .navi nav ul li a{
color: white;
}
.main .navi nav ul li a:hover{
color: #be9c21;
transition: 0.5s;
}
.main .info{
padding-top: 330px;
text-align: center;
position: relative;
z-index: 2;
color: white;
}
.main .info h4{
font-size: 40px;
padding-bottom: 30px;
color: yellow;
font-weight: bold;
}
.main .info h1{
font-size: 48px;
padding-bottom: 30px;
}
.main .info p{
font-size: 20px;
padding-bottom: 30px;
}
.main .info .btn{
width: 180px;
height: 50px;
border:none;
background: #be9c21;
margin: 20px;
border-radius: 30px;
font-size: 22px;
color: white
}
.main .info .btn1{
background: none;
color: #be9c21;
border:3px solid
#be9c21;
width: 180px;
height: 50px;
margin: 20px;
border-radius: 30px;
font-size: 22px;
}
.main .info .btn1:hover{
color: white;
background: #be9c21;
transition: 0.5s;
}
Free Source Code |
Youtube Channel |
Watch Full Video |
useful
ReplyDeletethank you so much
ReplyDelete