Topic: CSS Basics

span element – HTML


To style a section of text inside of another element, use the span element to wrap the text and add a class or id attribute:

<p>The span element is used to <span class="my-class">style text inside</span> of another element.</p>

To view this and the other 300+ tutorials on Simple Dev, sign up for a 10-day free trial.