How to create our own Portfolio Site free



Introduction

Creating a portfolio website is an excellent way to showcase your skills, projects, and experiences. In this tutorial, we will guide you through the process of building a portfolio website from scratch using HTML, CSS, and JavaScript. Additionally, we will explore how to use templates from free-css.com to save time and get a jump start on your project. Finally, we will discuss how to publish your site for free using Pro Hosting or GitHub Pages.

Step 1: Setting Up Your Project

First, create a new folder for your project. Inside this folder, create the following files:

  • index.html
  • styles.css
  • script.js (optional, if you plan to use JavaScript)

Step 2: Building the HTML Structure

Start by writing the basic HTML structure in your index.html file:


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Portfolio</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <header>
        <h1>My Portfolio</h1>
    </header>
    <main>
        <section id="about">
            <h2>About Me</h2>
            <p>Write something about yourself here.</p>
        </section>
        <section id="projects">
            <h2>Projects</h2>
            <div class="project">
                <h3>Project Title</h3>
                <p>Project description.</p>
            </div>
            <!-- Add more projects as needed -->
        </section>
        <section id="contact">
            <h2>Contact</h2>
            <p>Provide your contact information here.</p>
        </section>
    </main>
    <footer>
        <p>&copy; 2024 Your Name</p>
    </footer>
</body>
</html>
            

Step 3: Styling with CSS

Next, add some basic styling to your styles.css file:


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

main {
    padding: 2rem;
}

section {
    margin-bottom: 2rem;
}

.project {
    background-color: #fff;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 1rem;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}
            

Step 4: Adding Interactivity with JavaScript

If you want to add some interactivity to your site, you can use JavaScript. Create a script.js file and include it in your HTML file:



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Portfolio</title>
    <link rel="stylesheet" href="styles.css">
    <script src="script.js" defer></script>
</head>
<body>
    <!-- Existing HTML content -->
</body>
</html>
            

Now, add some basic JavaScript to your script.js file. For example, you can add a button that changes the background color of the page:


document.addEventListener('DOMContentLoaded', () => {
    const button = document.createElement('button');
    button.textContent = 'Change Background Color';
    document.body.appendChild(button);

    button.addEventListener('click', () => {
        document.body.style.backgroundColor = document.body.style.backgroundColor === 'lightblue' ? '#f4f4f4' : 'lightblue';
    });
});
            

Step 5: Using Templates

If you prefer to use a pre-designed template to save time, you can visit free-css.com and choose a portfolio template that suits your needs. Here's how you can do it:

  1. Go to free-css.com; and browse through the available portfolio templates.
  2. Once you find a template you like, click the download button to get the template files.
  3. Extract the downloaded files to your project folder.
  4. Open the extracted files and customize the HTML, CSS, and JavaScript to fit your personal information, projects, and contact details.
  5. Make sure to test your website locally by opening the index.html file in your web browser.

Using templates can significantly speed up the process and help you create a professional-looking portfolio with minimal effort.

Step 6: Publishing Your Website

Once your portfolio website is ready, you can publish it for free using one of the following methods:

Pro Hosting

Pro Hosting offers free hosting services. Here's how to publish your site using Pro Hosting:

  1. Go to the Pro Hosting website and sign up for a free account.
  2. After creating an account, log in to the control panel.
  3. In the control panel, look for the option to create a new website or upload files.
  4. Upload your project files (including index.html, styles.css, and any other necessary files) to the public directory.
  5. Once the upload is complete, your site will be live, and you can share the URL with others.

GitHub Pages

GitHub Pages is another great option for hosting your site for free. Follow these steps:

  1. Create a GitHub account if you don't already have one.
  2. Create a new repository on GitHub and name it username.github.io, where "username" is your GitHub username.
  3. Clone the repository to your local machine using the Git command line or GitHub Desktop.
  4. Copy your project files (including index.html, styles.css, and script.js) into the repository folder on your local machine.
  5. Commit the changes and push them to the GitHub repository:
  6. 
    git add .
    git commit -m "Initial commit"
    git push origin main
                    
  7. Go to the repository settings on GitHub, scroll down to the "GitHub Pages" section, and select the main branch as the source for GitHub Pages.
  8. Save the settings, and your site will be published at https://username.github.io.

GitHub Pages is particularly useful for developers as it integrates well with version control and allows easy updates to your website.

Vishal Raj

Graphic Designer, Game Developer, Web Developer and Data Scientist.

Post a Comment

Previous Post Next Post