Hi, I just completed my first assignment. Would love some feedback. Thanks!
Hey there, I think your tribute page looks awesome! My only comment is that the image looks a little small on mobile devices. Try using a media query to set the imageâs width to a larger percentage if the screen is below a certain width. I also think it would look nice if you centred the title. Adding the CSS properties âtext-align: centerâ and âmargin: autoâ should do the trick .
Keep up the good work. I hope you continue to pursue coding
Thanks for the feedback! I changed the #img-div to be 95% wide at under 500px, which I think should cover just about every phone?
Welcome to the forums @cehrlich. Your page looks good. 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 thebody
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.- For instance links to fonts go in the box labeled âStuff for <head>â
- You also have elements placed incorrectly. Review this for an understanding of the HTML boilerplate tags.
- Run your HTML code through the W3C validator.
- There is an HTML syntax/coding error you should be aware of and address. (One of your
ul
elements is nested incorrectly)
- There is an HTML syntax/coding error you should be aware of and address. (One of your
- Use external styling. Do not use internal (or in-line) styling.
- 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
- Use the DRY (Donât Repeat Yourself) principle.
- the
font-family
andcolor
are the same forh1
andh2
, as well asp
andul
are styled the same.
- the
Thanks for the feedback!
One question regarding your last point: if h1 and h2 have the same font-family and color but h1 has some additional properties, would something like this be a better implementation?
h1, h2 { <!--shared properties--> }
#extra-stuff-for-h1 { <!--h1 properties--> }
<h1 id="extra-stuff-for-h1">Heading 1</h1>
<h2>Heading 2</h2>
And in general, is there a good resource to learn about some best practices on this?
Yes, that would be better. Easier to maintain.
Other than remembering the DRY principle itâs just something that will come over time or from having your code peer reviewed and having it pointed out to you.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.