Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XHTML strict span inside label is semantic

Tags:

People also ask

Can we use span inside label?

You can use span elements instead. block-level elements are not allowed in span either.

What is difference between Span and label?

The <span> tag is much like the <div> element, but <div> is a block-level element and <span> is an inline element.


I'm using XHTML strict. I want to put a SPAN tag inside LABEL tag. Is it correct way?

<label>Username <span>*</span></label><input type="text" .... />