Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

FAQ accordion with Tailwind and Vanilla JS

fileccβ€’ 470

@filecc

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Another challenge completed. πŸ₯°πŸŽ‰πŸΎ

Community feedback

Finneyβ€’ 3,030

@Finney06

Posted

Hello there πŸ‘‹. Good job on completing the challenge !

Here are some suggestions regarding your code that may be of interest to you.

HTML 🏷️:

To clear the HTML validation report:

  • To fix the error "Element 'div' not allowed as child of element 'button' in this context," you should move the <div> element outside of the <button> element or replace it with a permitted element. The permitted elements that can be direct children of a <button> element are:

    • <a>
    • <svg>
    • <use>
    • Text

Here's an example of how to fix the error by using a <span> element instead of a <div> element inside the <button> element:

<button>
  <span class="flex justify-between items-center">
</span>
</button>

To fix the "The 'type' attribute is unnecessary for JavaScript resources" info error, you can simply remove the "type" attribute from the tag is text/javascript, so you don't need to explicitly specify it when including a JavaScript resource.

I hope you find it helpful!😏 Above all, the solution you submitted is πŸ‘Œ. πŸŽ‰Happy coding!

Marked as helpful

0

fileccβ€’ 470

@filecc

Posted

@Finney06 Thank you so much! I usually use the W3School html validator... but not this time, as you can see. πŸ˜…

I addressed the iusses you pointed out, thanks a lot!

1
Finneyβ€’ 3,030

@Finney06

Posted

@filecc you're welcome

0

Please log in to post a comment

Log in with GitHub
Discord logo

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