<span> (same line) This tag don’t have any attributes. With out line brake we can apply styles to certain portion of text.
We can write CSS program to add required attributes to the tags as follows:
Example-1: for <span> using inline CSS
<html>
<head>
<title>CSS Span Styles</title>
</head>
<body>
<p> Welcome to <span style="color:red; background-color:yellow" >HTML & CSS </span></p>
</body>
</html>
o/p:--------------------------------------------------------
Welcome to HTML & CSS
We can write CSS program to add required attributes to the tags as follows:
Example-1: for <span> using inline CSS
<html>
<head>
<title>CSS Span Styles</title>
</head>
<body>
<p> Welcome to <span style="color:red; background-color:yellow" >HTML & CSS </span></p>
</body>
</html>
o/p:--------------------------------------------------------
Welcome to HTML & CSS
No comments:
Post a Comment