Quote Originally Posted by friscofrankie
title="" width="631" height="420"
Going even further, You see above I put in an "alt" tag this is read by search engines and is required for all images if you want your code to be xHTML compliant.
This also gives you that nice little floating pop up when you mouse over in Internet explorer. The title tage should actually be the same and is handy and compliant for other tags as well (great way to put a help title on a link; too bad IE doesn't read it; maybe 8 does?) the alt & title attributes can be empty but the alt is required (e.g 'alt="" ') as stated above. The width & height attributes tell your browser what space to reserve for your image. In most modern browsers the page content can now continue to load around the reserved area while the image loads in the back ground. If you leave these attributes empty some browsers will interpret that as "0" and your image will not be rendered (rightly so), the space being filled by whjatever comes next in the code (depends on positioning and otehr styl attributes perhaps stored in a css file).

Now if you are paying attention, you may have noticed that extra space and slash beofer the closing right bracket. This is a way to "self close" a tag in lieu of a </img> tag. Many engines will not recognize the "/>" as a closing tag unless there is a preceding space, don't forget the space. So, in order to have every advantage and be accepted as xHTML strict compliant I always add it. xHTML is a subset of xml delivering HTML tags. All of which is based on the SGML (Standard Generalized Markup Language) whish is based on GML the grandaddy of 'em all. it gets weird and there is no reason to lear the history unless you're bent that way.

There are two standards adn you tell the browser what you are presenting in teh first line of code: for this page it is:
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"
for all the sites I build i use the doctype strict as opposed to transitional.
There are several other standards available; I've got a list of 'em somewhere and they are posted on the net

There are even ways to trigger a "Quiks mode" for many browsers, then you gotta know the borwsers "quirks" IE has plenty, let me tell you. Don;t use Quirks mode unless you are serving to a closed intranet and can control client configs better yet don;t use them.

There are ways, using xHTML to even add attributes that are acceptable but requires you to serve up your own DTD and declare your own namespace. This is tedious and requires a helluva lot more coding inteh HTML document diluting what ever keyword density you may have.

If someone is truly interested in learning HTML to build sites for others or even tobuild a site that will drive business to your door, i would highly recommend skipping the transitional and simple HTML standards and learning strict xHTML. Good ol' HTML 4.01 promotes sloppy coding IMO it is easy to put up a page with it and is very forgiving of improperly nested tags and unclosed tags, but can lead to inconsistent and just plain ugly results, especially when adding in cascading style sheets and some DOM manipulation via Javascript.

HTML doesn't work when included in a post
Yeah as I posted earlier the brackets that start and stop tags "<" & ">" are put into the DB as htrml codes that allow a browser to render them as you see above. This si to prevent all kinds of ugly shit from happening. All a forum is is a complex and advanced Content management system with limited styling options. Each poster contributes content the forum then manages it to keep posts in the right thread under the right forum.

If you were allowed to enter html there are dangers to the users and the render of the forum. The over head on filtering tag types (Don't allow <script></script tags for instance or make sure each <xxx> has a corresponding </xxx> closing tag for another) would make give this forum a huge footprint and the admin would be at the mercy of the coder that wrote this software to have ensured every malicious use of ever html tag was being filtered. Not sure I'd want to do that.

For a hobby site or a vanity site much of the above is not necessary and normal HTML will work. But if you are going to do sites for others or want good SEO results, take the time to learn proper xHTML. well formed XML is much easier for Search Engines to parse and index properly.