Tribute to Elon Musk (Project 01)

I would like some feedback on my tribute page:

Elon Musk tribute page

1 Like
  1. What you put inside your html frame goes inside your body tag on codepen, you should edit your head tags from your options.

  2. I recommend you to use bootstrap and nest your page inside container class so it will look centered.

  3. You can consider styling your fonts.

It looks okay. Improve colors and your general design. Keep working and be motivated, you are doing a great job!

Also in css you don’t put a dot while you are styling a tag like body,

.body {
width: 100%;
font-size: 10px;

This is wrong, the correct way is:

body {
width: 100%;
font-size: 10px;

The problem with your page is that it isn’t responsive and the code is of low quality (I’m sorry to say that, but it’s true).

Example given: you’ve set width and height of page elements to some fixed values (like 1500px). My laptop has smaller screen width, so all elements go out of screen. If you want your elements to be no bigger than specific value, use max-width instead.

Don’t use same id for multiple elements, this is just a no go, if you want to apply same appearance to multiple elements, use classes. Remember that you can apply multiple classes to same element by writing classnames separated by spaces like <div id="element" class="someclass anotherclass"></div>.

Use grid for company logos layout. Apply same class to each grid element, so you can have same appearance for every logo and make your CSS cleaner.

Use media query to resize page elements and reorganize layouts so the page fits on narrow screens as well.

Don’t use absolute position for elements if you have no reason to do so.

Your page looks good @laurentlugtenburg. Some things to revisit;

  • 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.
  • 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 upper 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 selectors. It can be problematic when doing maintenance)
    • (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.
    • using links” is not accessible
  • This, </br>, is not a valid HTML element
    • In addition, do not use the <br> element to force line breaks or spacing. That’s what CSS is for.
    • Reference MDN Docs
  • Make your page responsive. Remember, the R in RWD stands for Responsive
    • There’s a horizontal scrollbar on large and small screens

You’ll have an easier time with responsiveness if you use relative units (em, rem, percentage) rather than hard coding pixel values.
Think too that not everyone has a big monitor, view screen. For instance in the .header the following property: value; pair (width: 1483px;) will only be applicable for someone with a very large monitor. A handheld device is not that wide.

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