Create a Website
CSS Tutorial
FREE Domain!
Any web hosting you subscribe with DotEasy will get you a FREE domain name registration.
PLUS you get:
  • FREE Website Builder
  • FREE Blog
  • FREE Forum
  • FREE Photo Album
  • FREE Email Accounts
Get your FREE domain name today!
Home > JavaScript Tutorial
SSD Web Hosting with FREE Domain


Divisions are used to define sections of an (X)HTML file. A division can contain all the parts that make up your website. You can define a division within an (X)HTML file by placing the following between the <body></body> tags:

The Code

Content goes here

You can also add some style to it by doing the following:

The Code

<div id=”container”>
Content goes here

Then in the CSS file, we will have the following:

The Code

#container {
width: 80%;
margin: auto;
padding: 20px;
border: 1px solid #666;
background: #FFFFFF;

Everything within the “container” division will be styled by that division style rule defined n the CSS file. A division creates a linebreak by default.


Spans are very similar to divisions except they are an inline element versus a block level element. No linebreak is created when a span is declared.

Span tags are often used to style certain areas of text,

The Code

<p> This is an <span class=”orangeboldtext”>example</span>.</p>

Then in the CSS file,

The Code

.orangeboldtext {
font-size: small;
color: #FF5A00;
font-weight: bold;

Enjoy this tutorial?

1. Link to this page(copy/paste into your own website or blog):
2. Add this page to your favorite social bookmarks sites:
3. Add this page as your favorites. (Press Ctrl+D)