@skippysworld
Posted
It looks well overall. I can spot few misalignments in CSS but the logic behind rating seems to work well.
By inspecting your code quickly..:
-
You can improve your HTML accessibility using landmarks - such as
<main>
for main content of the webpage. -
IMG tags should include width and height attributes that matches source image ratio. When using decorative images such as icons that are not necessary for the rest of the content, you can embed them using CSS.
-
It's better to put script src tag at the end of your HTML file (before
</body>
tag). That way the HTML will get loaded properly first before loading JS interaction to it. -
var
statement is considered obsolete and should not be used for new designs anymore.let
andconst
are it's successor, lookup MDN site for more information about them.
You can look up my solution I made yesterday for this challenge, maybe it will inspire you :)
Enjoy and keep it up!
@danrare
Posted
@skippysworld Thanks a lot for the feedback. Noted.
@AtanasovCode
Posted
@skippysworld
Your answer is great but one thing I would like to mention is for point number 3.
You can put your script:src
tag inside of the <head>
by adding 'defer'. For example: script src="script.js" defer
This tells the browser to load the HTML first before loading the JS.
@danrare
Posted
@AtanasovCode oh thanks atana. Another code up my sleeves. Anyways I had used DOMcontentLoaded in the js