Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

html style sheet tags css tutorial and examples
 

css, span and div

consider div and span as html style sheet tags

stylesheets and span

both div and span have no real meaning as html tags and only serve any use when a stylesheet is applied
<span> is an inline element, which means it can start on the same line (like the font tag) and the <div> is a block level element, which means it must start on a new line (like a html table)

an example of span...

 <STYLE>
  SPAN {
        font-family: comic sans ms, garamond, arial;
        font-size: 14pt;
        font-weight: bold;
        color: #0000FF;        
  }
 </STYLE>

<span>this is span</span>

div and stylesheets

div, short for division, is an exellent way to very quickly add blocks of color to a html document
div can contain other block level elements, including tables
div seems to work best with a class

an example of div

 <STYLE>
  DIV {
       border-style: ridge;
       border-color: #FF0000;
       border-width: 5px;
       padding-left: 10px;
       padding-right: 10px;
       background: #009999;
       color: #00FF00;    
  }
 </STYLE>

home
home

next: stylesheets & cursors
previous: problems with stylesheets

html tutorial css tutorial javascript webmaster articles link exchange

css tutorial