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>

Click to view the demo





















Home »
  HTML CSS »
    HTML »




HTML Introduction
HTML Document
HTML Section
HTML Group Content
HTML Text Marker
HTML Table
HTML Form
HTML Embed