Is it a proper method to use span tag inside H1 tag?
Yes, it's typically fine to use a span
inside of an h1
. span
is an inline element, so it's typically okay to use it inside anything (that allows elements inside it!)
And there's not really a cleaner way to do it sometimes, say if you want to style only part of the h1
.
On the other hand... don't do it if it's not necessary, as it is a little ugly : )