Design comparison
SolutionDesign
Solution retrospective
I'm kinda confused about where to use <span> tag. Is my use of it here ok or should it be inside the <p> tag? Or maybe not use it at all. Any other feedback is appreciated
Community feedback
- @markup-mitchellPosted about 3 years ago
Good question.
It should be inside the
<p>
tag. If we think of<div>
as a "meaningless" block-level element,<span>
is a meaningless inline element; it lets us do arbitrary visual styling without affecting the flow of content.The styling is a visual affordance. The content is:
"Annual plan $59.99/year"
not
"Annual plan"
"$59.99/year"
Marked as helpful0
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