1. Home
  2. Computing & Technology
  3. Web Design / HTML

Converting the body Tag to CSS

By Jennifer Kyrnin, About.com

On most HTML documents, the body tag is choked with attributes defining various things. But all of these attributes can be converted to CSS. Take a typical body tag:

<body marginheight="4" marginwidth="4" topmargin="4" leftmargin="4" rightmargin="4" link="#cc0000" text="#000000" vlink="#cccccc" bgcolor="#ffffff">

And the same CSS:
body {
margin : 4px;
color : #000;
background: #fff;
}
a:link { color: #c00; }
a:visited { color: #ccc; }

More Web Design / HTML Quick Tips

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Converting the body Tag to CSS

©2008 About.com, a part of The New York Times Company.

All rights reserved.