Welcome to our blog Contact Us Subscribe!

Simple Portfolio Website In HTML & CSS

Here in this blog post, I have shared source code for a simple portfolio website in HTML and CSS. Also, I have provided a link to the GitHub repositor

Simple Portfolio Website In HTML & CSS

Here in this blog post, I have shared source code for a simple portfolio website in HTML and CSS. Also, I have provided a link to the GitHub repository for a simple portfolio website in HTML and CSS only.

Simple Portfolio Website In HTML & CSS

index.html


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- External CSS File -->
    <link rel="stylesheet" href="style.css">
    <!-- Favicon -->
    <link rel="shortcut icon" href="profile.png" type="image/x-icon">
    <title>John Roe - A Web Developer</title>
</head>

<body>
    <!-- *****************Home Page******************* -->
    <section class="home">
        <div class="left-home">
            <div class="home-content">
                <h1 class="name">John Roe</h1>
                <p class="postion">I am a Web Developer</p>
                <div class="btn-group">
                    <a href="mailto:alivecoder0gmail.com" class="btn">Mail Me</a>
                    <a href="portfolio.html" class="btn">My Portfolio</a>
                </div>
            </div>
        </div>
        <div class="right-home">
            <div class="img-container">
                <img src="profile.png" alt="John Roe">
            </div>
        </div>
    </section>
    <!-- ******xxx***********Home Page************xxx******* -->
</body>

</html>

style.css


/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Bootstrap Icon CDN Link */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css");

/* font-family: 'Exo 2', sans-serif; */
/* color1 = #dc143c */
/* color2 = #282c3f */

/* ***************CSS Reset********************* */

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Exo 2', sans-serif;
}

/* ***************Home Page********************* */

.home{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}


.home .left-home{
    width: 50%; 
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home .left-home .home-content{
    text-align: center;
}

.home .left-home .home-content .name{
    font-size: 6rem;
    color: #282c3f;
}

.home .left-home .home-content .postion{
    font-size: 2.5rem;
    color: #dc143c;
    font-weight: 600;
}

.home .left-home .home-content .btn-group{
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
}

.btn{
    padding: 1rem 1.4rem;
    color: white;
    background-color: #282c3f;
    text-decoration: none;
    border-radius: 0.4rem;
    font-size: 1.4rem;
}
.btn:hover{
    opacity: 0.8;
    transition: .3s;
}


.home .right-home{
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home .right-home .img-container{
    width: 60%;
    height: auto;
}
.home .right-home .img-container img{
    width: 100%;
    height: auto;
}

/* ****xx***********Home Page**************xx******* */

/* ***************Porfolio Page********************* */

.portfolio{
    padding: 2rem;
}

.portfolio .nav a{
    color: #dc143c;
    text-decoration: none;
    font-size: 2rem;
}

.portfolio .nav a:hover{
    opacity: 0.8;
    transition: .3s;
}

.portfolio .portfolio-container{
    padding: 1rem;
}

.portfolio .portfolio-container .portfolio-box{
    display: flex;
    gap: 1rem;
    color: #282c3f;
    margin-top: 3rem;
}
.portfolio .portfolio-container .portfolio-box .portfolio-content a{
    color: #282c3f;
    text-decoration: none;
}

.portfolio .portfolio-container .portfolio-box .portfolio-content a:hover{
    text-decoration: underline;
    transition: .3s;
}

.portfolio .portfolio-container .portfolio-box h2{
    font-size: 3rem;
}

.portfolio .portfolio-container .portfolio-box .portfolio-description{
    margin-top: 0.5rem;
    font-size: 1.4rem;
}

/* ******xxx*********Porfolio Page************xxx********* */



/* *****************Responsiveness******************* */

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

    .home .left-home .home-content .name{
        font-size: 4.3rem;
    }

    .home .left-home .home-content .postion{
        font-size: 1.8rem;
    }

    .btn{
        padding: 0.8rem 1.2rem;
        font-size: 1.2rem;
    }

    .portfolio .portfolio-container .portfolio-box h2{
        font-size: 2rem;
    }
    
    .portfolio .portfolio-container .portfolio-box .portfolio-description{
        font-size: 1.2rem;
    }

}

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

    .home{
        height: auto;
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 0;
    }

    .home .left-home{
        width: 80%; 
    }

    .home .right-home{
        width: 80%;
    }

    .portfolio .portfolio-container .portfolio-box .portfolio-description{
        font-size: 1rem;
    }
    
}

@media screen and (max-width:375px) {
    .home .left-home .home-content .name{
        font-size: 3.4rem;
    }

    .home .left-home .home-content .postion{
        font-size: 1.4rem;
    }

    .home .left-home .home-content .btn-group{
        gap: 1rem;
        margin-top: 2rem;
        flex-direction: column;
    }


    .portfolio{
        padding: 1rem;
    }

    
    .portfolio .portfolio-container .portfolio-box h2{
        font-size: 1.5rem;
    }
    
    .portfolio .portfolio-container .portfolio-box .portfolio-description{
        font-size: 1rem;
    }

    .portfolio .nav a{
        font-size: 1.5rem;
    }

    .portfolio .portfolio-container .portfolio-box{
        margin-top: 2rem;
    }

    .portfolio .portfolio-container{
        padding: 0.5rem;
    }
    
}


/* *********xx********Responsiveness*********xx********** */

About the Author

Hi! I am Sailesh Rijal, A Fronted Web Developer at AliveCoder. If you ask me for my short introduction then I would love to tell my self as a noob web designer who wants to learn and grow everyday.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.