Analytics Bosipha

Loading

๐Ÿง‘โ€๐Ÿซ Lesson 2: Add Images, Links & Layouts to Your Website

๐Ÿ”ง Skill Level: Beginnerโ€“Intermediate

This lesson builds on Lesson 1 and teaches users how to:

  • Add images to a webpage
  • Link to other pages or websites
  • Create a simple 2-column layout using HTML + CSS


๐ŸŽฏ What You’ll Learn

โœ… Inserting images (locally & from the web)
โœ… Creating clickable links
โœ… Building a simple layout with div and flexbox
โœ… Keeping HTML organized with sections and classes

๐Ÿ“ Continue from Lesson 1

You’ll be editing the same files:

  • style.css
  • index.html
๐Ÿ”น Step 1: Add an Image

Find a photo of yourself (or any image) and save it in the same folder as your index.html file. Rename it to:

profile.jpg

Now, open index.html and add this image tag inside the <header>:

<img src="profile.jpg" alt="My Photo" class="profile-img" />
๐Ÿ”น Step 2: Add Some Links

Under the “About Me” section, add a few links like this:

<section>
  <h2>About Me</h2>
  <p>I love building websites and helping others learn how to code.</p>
  <p>Check out my work:</p>
  <ul>
    <li><a href="https://github.com/" target="_blank">My GitHub</a></li>
    <li><a href="https://linkedin.com/" target="_blank">My LinkedIn</a></li>
  </ul>
</section>
๐Ÿ”น Step 3: Create a Two-Column Layout

Wrap the “About Me” section and image in a container like this:

<div class="about-section">
  <img src="profile.jpg" alt="My Photo" class="profile-img" />
  <div class="about-text">
    <h2>About Me</h2>
    <p>I love building websites and helping others learn how to code.</p>
    <ul>
      <li><a href="https://github.com/" target="_blank">My GitHub</a></li>
      <li><a href="https://linkedin.com/" target="_blank">My LinkedIn</a></li>
    </ul>
  </div>
</div>

Now, add this CSS to style.css:

.profile-img {
  width: 200px;
  border-radius: 100px;
  margin-right: 20px;
}

.about-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.about-text {
  max-width: 500px;
  text-align: left;
}
๐Ÿ”น Step 4: Save & Refresh
  • Save both index.html and style.css
  • Open index.html in your browser
  • You should now see your profile photo, text, and links side by side!

๐ŸŒ Publish or Update Your Site

If you already published your site in Lesson 1, just upload the new files again:

โœ… Update your site on Netlify
โœ… Push changes to GitHub Pages
โœ… Or publish it with us

๐ŸŽ‰ Thatโ€™s a Wrap!

Youโ€™ve just added real structure and media content to your personal website.

Next lesson: Weโ€™ll add a contact form and make your site mobile-friendly!

โค๏ธ If You Enjoyed Thisโ€ฆ

๐Ÿ‘‰ Like and follow for more tutorials!
๐Ÿ‘‰ Leave a comment or question below!
๐Ÿ‘‰ Share your finished website with us!

Leave a Reply

Your email address will not be published. Required fields are marked *