HTML Styling span elements Code For Website - Learn About Website | DaddyFile

0

The <span> Element Explain

The <span> element is an inline element that is often used as a container for some text.
The <span> element has no required attributes, but style and class are common.
When used together with CSS, the <span> element can be used to style parts of the text.



Html Code:

<!DOCTYPE html>
<html>
<body>

<h1>My <span style="color:red">Important</span> Heading</h1>

</body>
</html>





Html Code Result:

My Important Heading

Post a Comment

 
Top