Attempt on Tribute Page Project

Hi fellow campers! This is my first time coding in HTML/CSS and I just finished the tribute page project. Any feedback would be much appreciated. Thanks!

Here’s the link to the code: https://codepen.io/bbshark/pen/oNGzXXz

Hello heretocode123, your tribute page looks great and awesome.
There are some points to be fixed in your css.

  1. Analyze your css like the following image:
    スクリーンショット (248)

  2. Or, you can check your code in the following W3C validator website. The W3C Markup Validation Service

I hope your website looks better after fixing!
Happy coding!

1 Like

Hello @heretocode123,

First, congrats to have realised your first HTML/CSS code! Now, let me give you some suggestions. As you are at your first steps, I suggest you to practice the structure of an HTML code. I know that with CodePen it is not necessary, and I know that many people would say it is not necessary, but it is. You will not always be on CodePen especially if you work on a personal project or professional one. So it is important that the structure be respected.

Example of structure:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <title>My Page Title</title>
  </head>
  <body>
    <!-- Your code -->
  </body>
<html>

I know, in CodePen, the <head> part is not useful, you don’t even need to use the link to your CSS as CodePen do it for you, but it stays a good practice for a beginner. It is in repeating actions and practicing that it will stay in the mind.

Let’s watch your HTML code a little now. Did you see the way I defined the head tag in my example? Look yours:

<head>
  <h1 id="title">Roger Federer</h1>
  <p id="description">A legendary tennis player</p>
</head>

The <head> tag should contains the meta data of your page, not what you are gonna show. The part in your head should be in the <body> tag.

Let’s talk about the <main> tag now. This also should be in the body tag. The <main> tag represents the majority content of your document’s <body>. Here, you seem to be using it as a <body> tag which is not.

After, in your code, you are free of using the structure you want. Be always aware of the way to use a tag and when to use it. You will always have a result visually but it can become quickly difficult if you want a good SEO. A good structure helps for that.

Don’t use <strong>, for example, because on your browser it gives it a bold visual. It is the browser that decide this. This tag should be use because what it surrounds is very important. Same for <em>, which stand for important. You can modify their visual in your CSS after. For the SEO, it is good to understand and respect this.

These are some suggestions, once again congratulation for your first project and keep the hard work! Good luck for the next projects :wink:

Welcome to the forums @heretocode123. Your page looks good. Some things to revisit;

  • Verify your email addr with codepen so we can see your page full view
  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in the HTML editor. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.
    Mentioning too because you have elements out of order. Review this for an understanding of the HTML boilerplate tags.
    Everything the browser renders belongs between the body tags. And I think you are confusing the head element with the header element.
  • Run your HTML code through the W3C validator.
    There are HTML syntax/coding errors you should be aware of and address.
    Since copy/paste from codepen you can ignore the first warning and first two errors.
  • Codepen provides validators for HTML, CSS and JS. Click on the chevron in the upxper right of each section and then click on the respective ‘Analyze’ link.
    The one for CSS is good. Use it and address the issue(s). (be wary of duplicating property: value; pairs. it can make maintenance harder)
    (The one for HTML misses things which is why I recommend W3C)
  • Accessibility is about being accessible to all users. Review the giving meaningful text to links lesson. For a more thorough explanation read Web Accessibility in Mind.
    wikipedia entry” is not accessible

When asking for feedback on projects it’s best to open the topic in the #project-feedback subforum.
I’ve taken the liberty of moving this for you.

Thanks! Didn’t know about the website and it is helping me a lot.

This is great, thank you! I’ve been very confused on using HTML tags for head, header, and body until I saw your feedback. This helps a lot!

Thank you so much for your feedback and for the articles! My code is looking a lot better!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.