Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 10 months ago

Recipe Page

P
Leonard Cohen•210
@lenny131
A solution to the Recipe page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

One of the primary goals of this project was to use semantic HTML for all elements. I did use <b> for some bolded text, since it seemed more appropriate than using <strong>, which has a specific semantic meaning which was not appropriate in this case. I could have also used <span> instead, but that would provide even less semantic value.

What challenges did you encounter, and how did you overcome them?

Styling the lists was somewhat challenging. The bullet points are normally placed outside the left margin of the <ul> or <ol> element. Setting the list-style-position property to inside would solve this problem, except this causes multi-line text to wrap around the bullet. I decided to add some left-side padding instead.

Regarding the top image, I considered leaving the alt text blank, but it's unclear if this image should be considered purely decorative, and after some slight html layout changes it wouldn't benefit from the paragraph description of the recipe. (Although, it's possible that the h1 heading still provides enough information to the user to justify removing the alt text.) Ultimately, I decided to include the alt text to be safe.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Leonard Cohen's solution.

Join 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License