<span> HTML Tag

In this article we will discuss about how to use span tag in HTML.
  • 2127

The <span> tag allows us to provide localized formatting within the document. It is used to change the style of text within the document.

HTML Code:

<html>

<head>

    <title></title>

</head>

<body>

    Purple text with yellow background <span style="color: purple; text-decoration: line-through;

        background-color: yellow">One short phase </span>

    <br>

    <br>

    Light Blue Eyes<span style="color: lightblue; background-color: pink">This is my eyes</span><br>

    <br>

    <span style="color: red; font-size: 14pt">You can add colored text</span>

</body>

</html>

 

Output:

Purple text with yellow background One short phase

Light Blue Eyes This is my eyes

You can add colored text

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.