Why is content between H1 tags also wrapped in a span tag? Isn't that redundant? I could just style the H1 tag, right? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why is content between H1 tags also wrapped in a span tag? Isn't that redundant? I could just style the H1 tag, right?

Question about code shown in first level lessons.

21st Aug 2017, 2:41 PM
2coda
1 Answer
+ 6
you can style the h1 element with an id for a specific h1 element if you have multiples of it (not recommended to have multiple h1 elements). span is not necessary use it if you want to style something in between a block level element https://developer.mozilla.org/en/docs/Web/HTML/Element/span <span> - HTML | MDN - Mozilla Developer Network
21st Aug 2017, 3:14 PM
Lord Krishna
Lord Krishna - avatar