Add the 'X' factor to HTML
Written by admin on November 3, 2009
XHTML developed by the World Wide Web Consortium (W3C) and a consensus was invited on the introduction of XML as a new version of HTML. Thus, XHTML (Extensible HyperText Mark-up language) became the new mantra for the webmasters and the techies. HTML gradually lost its grounding with an impactful arrival of XHTML. HTML has suddenly become a thought of the past as it tends to make your site inferior when we talk about the universe of the web. As HTML was not web compliant, this hybrid followed the global standards.
XHTML serves the basic objective of visual consistency across all the browsers and platforms. The coding for XHTML is done in a unique fashion so that the search engines optimize the websites. Some people who use HTML for their websites but want to update their codes to XHTML can follow these tips.
- Lowercase must be used for all the tags
All <P> tags must be replaced with <p>. For convenience, turn off the caps lock function, match the case and find-replace the tags with the lowercase.
- All tags must be closed
Once the tags are written, they must be closed either in case of paragraphs or any other tag like <p> and following it with </p>. Any tag without a closing element like <img> or <br> can be closed with as slash “/” before “>” (/>). You even need to close the header tags: <meta name = “keywords content = “keywords, go, here”/>. This habit needs to be inculcated to avoid errors in coding.
- Tags must be nested properly
The tags are closed just in the same manner as they are closed.
WRONG – <p><strong>Hi!</p></strong>
CORRECT – <p><strong>Hi! </strong></p>
So, don’t do it the wrong way.
- Double speech marks must be used
Double speech marks are important to use inside the tags.
For eg : in an image tag: WRONG – height = 50, CORRECT – height = “50”
- Alt tags must be added
Alt tag is an important feature while using the image as it provides consistency in the images. The alt tags provide a description to the pictures which forms the visual structure. If you have spacer images, use alt = “” rather than using alt = “spacer”. Avoid the use of word space in the speech marks.
- Avoid <font> tags
Use the basic CSS layout functions for font tags. To style and size your text, using paragraph or span tag is undoubtedly a better proposition.
- Character entity codes must be used
Using simple codes of character entity helps in upgradation of HTML to XHTML.
- CSS coding for your sites
CSS coding makes the size of the website shrink and the control over the site increases exceptionally. This certainly helps to optimise the site for major search engines.
Following these steps would give a full control over your newly coded XHTML website. You can join the competition in the rest of the web world and feel superior.
Share on TwitterComments
Trackbacks
- Psd to Xhtml TutorialsAdd the ‘X’ factor to HTML 11-05-2009 at 12:07 pm
- Mike Lane 11-05-2009 at 12:52 pm
- Kawsar Ali 11-05-2009 at 11:18 pm
- Cam Olivier 11-06-2009 at 4:54 am
- Add the ‘X’ factor to HTML | Design You Trust. World's Most Provocative Social Inspiration. 11-06-2009 at 12:11 pm
- 80+ Awesome Community Links for Designers and Developers | tripwire magazine 11-06-2009 at 8:43 pm
Submit Reply




11-27-2009
5:13 am
Dindigul
good information. i followed these things.