Sometimes when thinking about HTML, all we focus on are the tags. But the attributes of the tags are often just as important as the tags themselves. In fact, there are several tags with attributes that many people don't know anything about. The following are some of the tag attributes that are not as common but can add value to your pages.
With the anchor tag, you can create links and bookmarks, as most people already know, but there is an attribute that isn't as well known.
the title attribute creates a title for the link. Browsers handle it in different ways, but a popular way is to create a small popup window with the text in it. It allows you to provide more information about the link without cluttering your Web page.
<a href="http://webdesign.about.com/" title="Click here to go to the Web Design front page">About Web Design</a>
When people think of attributes for the hr tag, it's often to determine the width and size of the line. But there are a few other attributes that can make your line more unique.
this is my favorite attribute of the hr tag. It turns off the 3d effect to give you a solid line:
<hr noshade="noshade" width="50" align="left" />
<hr style="color: #000; width: 50px; float: left;" />
giving your line a color will make it blend in with your page more effectively.
<hr color="#ff0000" width="50" align="left" />
<hr style="color:#f00; width: 50px; float: left;" />
The body tag has many attributes, but there are several that allow you to manipulate how your page displays in the browser.
define where the left margin should be in the browser. It's written in pixels, 0 puts it flush left. This attribute works only in Internet Explorer.
this tag works the same as leftmargin, only it defines where the top of the page should be in the browser. Again, 0 pixels is flush with the top of the window. This is an attribute for Internet Explorer.
the marginwidth attribute is Netscape's answer to leftmargin. Written in pixels it defines how close to the left margin the page will load.
also a Netscape attribute, the marginheight attribute defines how close to the top of the window the page should load.
Check out the tags you're going to use to see if there are attributes that might give you more power over your page.