@VCarames
Posted
Hey there! 👋 Here are some suggestions to help improve your code:
- The headings in your component are being used incorrectly❌. Since the
h1
heading can only be used once ⚠️, it is always given to the heading with the highest level of importance. This component has three headings of equal importance, so the best option would be to use anh2
heading ✅ since it is reusable and it will give each heading the same level of importance.
- Your "buttons" were created with the incorrect element ❌. When the user clicks on the button they should be directed to a different part of you site. The
anchor tag
will achieve this.
More Info:📚
- ALWAYS Implement a "Mobile First" approach 📱 > 🖥
Mobile devices are now the dominant 👑 way in which people browse the web. So when building your content, you will start building with small screen sizes (starting at 320px) and work your way to larger screens using min-width
.
More Info: 📚
If you have any questions or need further clarification, you can always check out my submission and/or feel free to reach out to me.
Happy Coding! 👾
Marked as helpful
@KoiHast
Posted
@vcarames thank you for your help! I actually originally had them as h2 headings, but the html report when I posted it said it required a h1 heading, and since those were the only headings on the page, I changed them.
Also, wouldn’t the anchor tag go within the button element? I’m not trying to argue, I just genuinely don’t know. Wouldn’t you make a button element with a link inside it to link to another page?
@VCarames
Posted
@KoiHast
Glad I could help!
Unfortunately, the report is not aware that this challenge is a component and not a full site. So it will always throw that error. But if you wish to get rid of it, you can always add a "visually hidden" h1
heading.
Do not ever feel like you are arguing by asking questions. That is how we learn.
There are two ways of creating "buttons" (they cannot be combined)
button
which are for actions; submitting forms, adding items to your card, etc..anchor
which allows you to navigate to either internal or external content, download content, etc..
What makes the anchor
element special is that it has a special attribute
, the href
, which allows you to enter a link.
Hopefully this clarifies things.
Marked as helpful
@KoiHast
Posted
@vcarames Thank you! I took a peek at your solution to see how you did it, and that totally makes sense now. I thought you had to use a button element for anything that, well, looks like a button. I never realized you could just style an anchor tag to look like a button!
Thanks again for your help!