Home arrow HTML arrow Page 5 - HTML Formatting and Colors

HTML Formatting and Colors

In our last tutorial we left off discussing some basic HTML formatting. In this episode we will continue our discussion of formatting and get into working with Entities. Thereís a lot to cover, so letís get busy.

Author Info:
By: James Payne
Rating: 5 stars5 stars5 stars5 stars5 stars / 8
January 15, 2008
  1. · HTML Formatting and Colors
  2. · Quotation, Acronyms, And More
  3. · Writing Backwards
  4. · Handing Out Citations
  5. · Background
  6. · Color Code Chart

print this article

HTML Formatting and Colors - Background
(Page 5 of 6 )

Since we are on the topic of text and displaying it, I think it is a good time to discuss backgrounds. The way your text looks is heavily influenced by your background choice. If you try to display yellow text on a white background for instance, the user's eyes will likely explode. Likewise if you display a dark image and try to use dark text against that background, your text will be unreadable.

There are two choices when setting the properties of your background. You can use colors or an image.

Images as Backgrounds

You can get some cool effects using images for your background. It can also come out looking stupid if you're not careful. A few things to note: if the image is smaller than your page, the browser will tile the image over and over. If the image is larger than your page, it will make the page bigger, which can screw up your layout. And finally, if the image is too large, it will slow the speed of your page loading.

Here is how you make an image your background:


<body background="thisisyourbackground.jpg">



Using Colors as a Background

Your other option is to use colors for your background. You can do this with the following code:


<body bgcolor="#7FFF00">




Hurts your eyes right? Muahahah! Setting the background color is just that easy.

Well that is it for this tutorial. I will leave you with a table displaying all of the color values and their codes. See you in the next tutorial. Till then...

blog comments powered by Disqus

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials