@danielmrz-dev
Posted
Hello @mverma45!
Your solution looks great!
I have a couple of suggestions (about semantic HTML) for improvement:
š First: Use <main>
to wrap the main content instead of <div>
.
Think of <div>
and <span>
in HTML like plain boxes or placeholders. They're handy for holding content, but they don't tell us anything about what's inside or what it's meant for on the webpage.
š Second: Only use one <h1>
per page - this should represent the main heading/title for the whole page. This project is not very obvious about what's the main title. In those cases, we use a hidden <h1>
and use <h2>
for the 3 others.
Unlike what most people think, it's not just about the size and weight of the text.
- The
<h1>
to<h6>
tags are used to define HTML headings. <h1>
defines the most important heading.<h6>
defines the least important heading.- And don't skip heading levels - start with
<h1>
, then use<h2>
, and so on.
All these tag changes may have little or any visual impact but they make your HTML code more semantic and improve SEO optimization as well as the accessibility of your project.
I hope it helps!
Other than that, great job!
Marked as helpful
@mverma45
Posted
@danielmrz-dev I didn't realize I had multiple <h1> tags, so since I want all the titles to be the same size. Could I create a class and just style the class to be like an <h1> ?
@danielmrz-dev
Posted
@mverma45
The size of the title does not matter because you can change it with CSS. You can make a <h1>
look like a <h6>
or vice-versa.
So yes, you can create a class to make them look like you want š
Marked as helpful
@mverma45
Posted
@danielmrz-dev thank you for your suggestions. I just refactored the code.
@mverma45
Posted
@danielmrz-dev I watch a YT video in the video it said px aren't used very much, it said to use em, rem's.
@danielmrz-dev
Posted
@mverma45
That's right. I normally use rems.
@mverma45
Posted
@danielmrz-dev I just followed you on all your social media you have on your profile