<span> and </span>

PURPOSE: To span a section of the page. Used in conjunction with CSS (Cascading Style Sheets Code).

Below is a basic html document. The referenced html tag is in RED. All tags must have a start and a end tag. Most end tags have a / before the tags name, however there are a few that are done differently. The tags that end differently will be noted and highlighted. The order of the start and end tags is also very important to proper display of your page in a web browser.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> The Page Title Goes Here </title>
<style type="text/css">
.r {color:red; font-weight:bold;}
</style>
</head>
<body>
<div><span class="r"> All the text between the span tags will be red. Note the class attribute is listed. The class is equal to .r . This class is defined in the style tags up in the heading of the page.
</span> All text after the span tag will be the default black. The span tag only affects a portion of text that is between the tags not the whole paragraph.</div>
</body>
</html>


© Copyright 2001,2002 Southern Twilight    All rights reserved.

Back To HTML Examples