span Element
Description
The span
element has no meaning in its own right.
You would use it to apply one of the global attributes to a region of content.
Example
The following code shows the span
element used with the class attribute.
<!DOCTYPE HTML>
<html>
<style>
.myClass {<!--from w w w .j a v a 2 s . c o m-->
border: thin solid black;
padding: 1px;
}
</style>
</head>
<body>
I like <span class="myClass">CSS</span> and
<span class="myClass">HTML</span>.
</body>
</html>