The <SPAN> tag





The span tag allows the user to change the style of a selected portion of the text. For examble, consider the sentence " Pentasoft is the leader in software training". If the user wants to change the style of the word Pentasoft,then this word alone can be included in the span tag. The span tag has an ID attribute The following example illustrates the use of the span tag:
<html>
<head>
<title>My first JavaScript Program</title>
<style type="text/javascript">
tags.body.background="white">
tags.p.fontSize="20pt";
ids.sp.fontStyle="italic";
ids.sp.color="blue";
</style>
</head>
<body>
<h3>This program illustrates the use of the SPAN tag</h3>
<p><span id="sp">Pentasoft</span>is the leader in software training</p>
</head>
</html>
Domain Name Search
|