Contact Us

|

FriendFeed FriendFeed

|

follow us on twitter Twitter

|

 Rss Feed

|

Favorites Add to Favorites

Wednesday, August 20, 2008

Tags

These are some of the most common tags.

* b could be used to make an element bold. Using strong (meaning strong emphasis) instead adds meaning, or to just add boldness, font-weight: bold in CSS does the job.
* i could be used to italicise an element. Using em (meaning emphasis) instead also adds meaning or font-style: italic can be used to just add the presentation.
* big could be used to make big text. Using headings instead (h1, h2 etc, when text genuinely is a heading) adds meaning, or simply using the font-size property in CSS gives more control.
* small could be used to make small text. CSS (font-size) once more gives more control.
* hr could be used to show a horizontal rule. It is unusual to use hr in a CSS designed page anyway; properties such as border-top and border-bottom or even just plain old images do the job much better.
* u could be used to underline elements. It remains that underlined text is still associated by many with links. This is why this tag died a long time ago - you really don't want to be underlining non-linking text.
* center could be used to centre one element within another. The CSS property text-align allows values of not only center, but left, right and justify as well.
* menu could be used to create a menu list. It does pretty much what ul does, but as an 'unordered list' is more general, ul stands tall over menu's corpse.
* layer is similar to a div element positioned with CSS. These only work in old versions of Netscape. So not very useful then.
* blink or marquee. Just say "NO!" kids. They are supposed to do exactly as they say, but have very limited support and were surely only ever intended to be very, very sick jokes.
* font, which could be used to define the font name, size and colour of an element has gained a deserved reputation of being the notoriously mischievous evil goblin lord of Tagworld. Old sites (even some new ones) have font tags splattered all over their pages like a plague of termites. Much of their proliferation has come about from web authoring software, placing font tags around every element that the web author applied colour or size to. Whereas a font tag needs to be applied to every occurrence of an element (say, every time you use a p element), with CSS you can apply properties to every occurrence of an element with just one single little line of code for your whole web site. Using this method, not only is the page weight substantially lighter than an equivalent font-tag infested page, but changes can be made more easily because all you need to do is change one line of CSS rather than every instance of a font tag. This also increases the likelihood of maintaining a consistent design across your site. font tags and the inappropriate use of tables are the two most common causes of unnecessarily bloated pages.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home