New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using <i> vs <span> for icons. #9464
Comments
Can you cite some sources in support of this? |
From W3 HTML Language Reference: The span element is a generic wrapper for phrasing content that by itself does not represent anything. |
@darrenbkl Thanks for the links, but IMHO those are definitions of Can you point us to any resources that state that this not a good practice? On a side note, this was discussed earlier that the use of /cc @FreeCodeCamp/issue-moderators |
@darrenbkl okay here is what I found that may help:
Also, I may be wrong but this something which campers will find used everywhere, and I think keeping them aware of the fact that this not standard spec, is used as a common practice is the best we should do and are doing in one of the challenges already. Refer the issue mentioned in the earlier comment where this is explained. Do let us know your thoughts. |
@raisedadead, I agree. We should let campers know that this is not good practice, but used all the time. I suggest we just add a sentence in the challenge instructions about this. |
@atjonathan as I said its there already #7512 (comment) And the OP did not mention any other specific challenge that gets affected. |
@raisedadead, sorry didn't see that comment. I think we can close this issue then. |
@raisedadead I don't think it is used in many places. If it's decided to let member aware of the spec, the challenge should also allows interchangeable use of those tags, i.e. not forcing the use of |
@atjonathan lets wait for OP's comment. |
@darrenbkl Yeah, you are correct indeed. We should allow alternative use. Thanks for reverting. |
To contributors: Change Text Inside an Element Using jQuery needs to be updated with instructions and tests to allow alternative use of Please comment and share your proposal before making a PR. |
@darrenbkl I don't think anyone uses the To empathize(italicize) text, you should use the |
I agree with @AkiraLaine. |
Here's Font Awesome's comment on the issue in question,
http://fontawesome.io/examples/ We should definitely allow the use of the span tag though. |
https://www.freecodecamp.com/challenges/add-font-awesome-icons-to-our-buttons Two more links where |
I'm working on this one. Will have a PR in later today. |
This was accepted: But this was not: Although they yield the same result. I am newbie here. I don't know if the latter has any side effect.. |
@sagayev please open a new issue. |
the challenges mentioned by AryanJ-NYC on 5 Aug 2016 are not yet updated |
@Mielai1l they've been changed in the codebase. You can see for yourself in the beta site. Changes will be pushed to the production site soon. |
Using
<i>
for icon is a not good, fcc shouldn't teach/encourage bad practice, use<span>
.The text was updated successfully, but these errors were encountered: