You are currently browsing the archives for the XHTML tips category.
Due to the nature of the Internet, people may be viewing your web page with many different types of browsers such as a text-only browser, a voice browser, or a cell phone; they may be clicking through your site without a mouse, or keyboard, or they may be browsing hands-free. Some people may be accessing […]
Several years ago a major push was made to begin separating the presentational aspects of a website from the structural aspects of it through the use of Cascading Style Sheets (CSS). By working towards this separation a website designer can make her job easier in many ways.
A clear sign of an amateur web designer is their use of the font tag. This tag was deprecated in HTML 4.01 which means it should no longer be used. Not only does it clutter up your documents, but it makes the look and feel of your website more difficult to change.
When creating an XHTML document you will need to specify the character encoding Internet Media Type, or Content-Type of the document. The W3C recommends that XHTML documents be sent as type text/html or application/xhtml+xml. This should be set by the webserver. If you cannot change the web server settings however, you can also specify this […]
One common question when working with XHTML and CSS is whether to use the id or class attribute on an element. There are several rules that you should consider when using either attribute.
Posted by admin on 09 Feb 2007 at 10:03 pm under XHTML tips
Special Characters and CDATA
In XHTML the < and & are special characters that the XML processor will interpret as the start of markup. You’ll usually find these characters in Javascript such as this simple if statement:
Posted by admin on 11 Jan 2007 at 12:22 pm under XHTML tips
Quote everything
In order to become a ninja coder you will have to pass the quote test. The rule is simple: quote all attribute values, period.
Here’s a GOOD example:
<a href=“http://yoursite.com”>My Site</a>
Posted by admin on 07 Jan 2007 at 5:44 pm under XHTML tips
Close those elements
When you’re creating valid xHTML you’ll need to make sure that you always close your elements properly. When your element has some data in it make sure you add an end tag directly after your data. Consider the following examples:
Posted by admin on 04 Jan 2007 at 6:10 pm under XHTML tips
The good thing, and sometimes the bad thing, about xHTML is that it requires strict attention to well-formedness and element and attribute capitalization. Here’s a quick guide that will make it easy for you to remember what to do and what not to do when you’re marking up a document.
XHTML is the defacto web standard markup language when it comes to creating websites … at least for now. It’s a development of the old HTML 4 standard which is compliant with the newer XML standard and is transitional in many ways. When you create your website using valid XHTML you create a website that […]