1. Computing & Technology

Discuss in my forum

Converting the body Tag to CSS

By , About.com Guide

See More About:

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; }

©2012 About.com. All rights reserved.

A part of The New York Times Company.