HTML Cookbook Basic HTML Course

It's Easy!



This is a sample page with a marble background in a div.


This is the div that has the background image. It is 400 pixels wide.

This is a paragraph in the div.

This is another paragraph in the div.


I like this effect so I made a class for it:
.marble { background-image: url(marble.gif)}

Then I put my class in my div:
<div class="marble" style="width:400px">

This technique can be used to replace tables that have background images.

I also made pages using this background-image in a page, a paragraph or a span. Check them out.



Valid XHTML 1.0!

Valid CSS!