How does <span> work in Learn typography by building a nutrition label?

In this assignment the element span is used to create different text alignments for words in the same line. I don’t understand how this works and would like to know the reason behind it. Is this something that the assignment makes you write in CSS? Thank you!

maybe you can read from this website HTML span tag or this <span>: The Content Span element - HTML: HyperText Markup Language | MDN

The span element helps for alignment of your text.
If you give your span a class and then you modify it in css then you can make it like spread out. Its like how you can add text to the same line but it can be on two whole different places on that line.

1 Like