Design comparison
Solution retrospective
"What did you find difficult while building the project?"
- I find the blue filter part a little difficult.
Community feedback
- @PhoenixDev22Posted about 2 years ago
Hello hitch95,
Congratulation on completing another frontend mentor challenge. Excellent work! I have some suggestions regarding your solution:
The HTML needs a little refactoring.
- Why did you use <section> in this challenge the way you did? According to MDN ,
<section>
is a generic sectioning element that is used whenever it doesn’t make sense to use the other more semantic ones. It is a container that stores self-contained content that still makes sense when placed in a different context. If you are only using the element as a styling wrapper, use a <div>. In this challenge, it’s all one component. Also remove<header>
landmark.
- The most important part in this challenge is the interactive element. Since there's a :hover state on the image and means it's interactive, So there should be an interactive element around it. When you create a component that could be interacted with a user , always remember to include interactive elements like(button, textarea,input, ...) For this imagine what would happen when you click on the image, there are two possible ways:
1: If clicking the image would show a popup where the user can see the full NFT, here you use
<button>
.2:If clicking the image would navigate the user to another page to see the NFT, here use
<a>
.- You should have used
<a>
to wrapEquilibrium #3429 and Jules Wyvern
too.
For any decorative images, each img tag should have empty
alt=""
and addaria-hidden="true"
attributes to make all web assistive technologies such as screen reader ignore those images in (icon-view, icon-ethereum, icon-clock
).- The link wrapping the equilibrium image (
image-equilibrium
) should either haveSr-only
text, anaria-label
that indicates where the link navigate the user(not describes the image).
- Never use
<div>
and<span>
alone to wrap a meaningful content. Just keep in mind that you should usually use semantic HTML in place of the div tag unless none of them (the semantic tags) really match the content to group together. By adding semantic tags to your document, you provide additional information about the document, which aids in communication.
- You can use unordered list
<ul>
to wrap middle part of the component. In each<li>
should be<img>
and<p>
.
- If you wish to draw a horizontal line, you should do so using appropriate CSS. You may remove the
<hr>
, you can useborder-top:
to the avatar's part.
- There are so many ways to add the hover effect on the image , The one I would use, using pseudo-elements to change the teal bg color to a hsla. Then opacity can be changed from 0 to 1 on the pseudo element on hover. There is no need for a extra clutter in the HTML. The icon view does not really need to be in the HTML. You can use CSS for it.
- Adding
rel="noopener"
orrel="noreferrer"
totarget="_blank"
links. When you link to a page on another site usingtarget=”_blank”
attribute , you can expose your site to performance and security issues.
- You have used
<br>
, using<br>
is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology. Screen readers may announce the presence of the element. This can be a confusing and frustrating experience for the person using the screen reader. You can read more in MDN.
- It’s not recommended to use
<br>
to increase the gap between lines of text Or make empty space between elements, usepadding / margin
styling via CSS. And about using <br> in the<p>
to make the paragraph break in new line, You may usemax-width
to<p>
and remove those<br>
hopefully this feedback helps.
Marked as helpful0@Hitch95Posted about 2 years ago@PhoenixDev22 Thank you for your comment. I will make the changes shortly. For your question, I wanted to put some html5 semantic tags rather than divs, but I made a mistake in my choice of tag.
0@Hitch95Posted about 2 years ago@Hitch95 I do the modification like you tell me. But i don't find any method to create the line without the "hr". I try multiples differents method (<div> with display "block" or "inline-block", a selector with "...:before") so i left my "hr" with the line class. For the rest, i change some "section" and removed all "span" element
0@PhoenixDev22Posted about 2 years ago@Hitch95 Remove the <hr> and just use border-top: 1px solid var(--Verydarkblue-line); to the
<footer>
I really recommend checking the HTML elements and when to use them like <article>, <footer> , <header>.... .
Hopefully this helps
0 - Why did you use <section> in this challenge the way you did? According to MDN ,
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord