Are you a Google Analytics enthusiast?
More SEO Content
XHTML and CSS
Posted 04 February 2004 - 09:12 AM
Posted 04 February 2004 - 09:36 AM
My newest site that just went up last month is all XHTML with a heavy dose of CSS. People like the design and report that it is extremely fast, even on a dial-up.
Posted 04 February 2004 - 09:58 AM
Posted 04 February 2004 - 10:06 AM
Validating a page can help sort issues with it not displaying right in browsers in cases. In this area the DocType is pretty important, some browsers go into 'quirks' mode if one is not defined.
HTML4.01 or XHTML1.0 are the 2 you're most likely to use at the moment. XHTML is the newer spec, but HTML Strict is actually tighter on your coding than XHTML Transitional.
The main difference between the 2 is that some things that were deprecated in HTML are now completely out of XHTML, a few slight syntax difference (such as tags like <img> now have to be self terminated <img /> style). You're also encouraged to use CSS for a lot more in XHTML than you need to in HTML4.01.
To start with I'd suggest using HTML4.01 Transitional which TopDog posted, looks to be full and correct.
As mentioned, IE is VERY forgiving on the code side of things, others like NS (especially 6+) and Opera are a lot stricter on what they need to make it work. Running it through a validator can sort a lot of cross browser issues.
Posted 04 February 2004 - 10:12 AM
XHTML has replaced HTML, but is not widely used because of the CSS compatibility issues with older browsers, particularly NS 4.
Its not a replacement for HTML, using XHTML is no more correct in a sense than HTML. Well done XHTML code does tend to be more compact and simpler to go back to.
Its not the actual XHTML that browsers have problems, but some of the CSS that is used for more of the styling. NS4 will handle some basic stuff but is pretty appaling at it overall.
As I mentioned in the last post, HTML4.01 Strict is really stricter on your syntax than XHTML1.0 Transitional is. If you can get through HTML4.01 Transitional ok, then try HTML4.01 Strict and see how you do. Sometimes you can't be 100% compliant, but that just takes a bit of knowledge and experience to know how far to go, bit of a compromise between browser compatibility, target audience, W3C Standards and development time involved.
Posted 04 February 2004 - 10:16 AM
The one exception is e-commerce sites. They tend to attract a wider variety of users, including a surprising number of NS 4 users. The percentage is still extremely small, but if you don't want to turn away potential buyers, you limit your options for the use of some CSS designs.
You are absolutely correct that an external style sheet is the only way to go. I can tweak colors, menu design and other elements for an entire site just by changing a single style sheet. It is very efficient.
Posted 04 February 2004 - 10:35 AM
Point us at a tutorial you recommend or other informational resource. I'm getting ready to start a site redesign so it's a good time to learn.
Posted 04 February 2004 - 10:45 AM
http://www.camaban.co.uk/xing.php is more of my take on the differences between the 2. The 2 links at the end are pretty good as well, especially the WDVL article.
Then its just a case of learning more advanced CSS and finding where your preferred compromise between the standards and browser compliance is. As has been mentioned, some browsers have pretty poor support for CSS so its going to partly depend on your target audience. NS4 can be served a simplified, less styled style sheet, so theres a bit fo a work around there. IE6 is then the main problem of the modern browsers.
Not sure how up to speed you are on CSS but I've got a few fairly basic CSS tutorials on my site. And theres a good list of CSS resources in the *cough*Cre8asite Resource Directory*cough*
Posted 04 February 2004 - 10:48 AM
I figured you would have some good resources Adrian! Thanks!
Posted 04 February 2004 - 10:57 AM
Posted 04 February 2004 - 11:01 AM
I don't know how much you currently know about XHTML, but I started with the simple W3 Schools XHTML tutorial at W3 Schools. You can do a search for "XHTML tutorials" and you'll find a ton of good information.
With XHTML, if you really take it to heart and adhere to the standards you'll gain a lot of efficiencies, which speed up page delivery and rendering. Plus, you will likely learn a lot more about CSS in the process. XHTML relies heavily on CSS.
Whether or not you want to call XHTML a replacement for HTML is, I suppose, a matter of opinion. There aren't very many sites using XHTML, primarily because of the CSS compatibility issues with older browsers, plus most WYSIWYG tools have not yet caught up with XHTML standards.
From what I have read, there are no plans to set an HTML 4.02 or HTML 5.0 standard. The current standard is XHTML, and the plan is to eventually push all developers to this new standard. Currently, it is more of an alternative that is just starting to catch on. I think HTML will be around for a long time.
I recommend that you stick to XHTML version 1.0 for now. There are newer versions, but in my opinion, too many HTML tags have been depreciated.
Posted 04 February 2004 - 11:11 AM
People like Jeffrey Zeldman (one of the big names in web standards) tend to recommend being realistic with it. Often he will use a kind of hybrid layout, some simplistic tables for overall structure and then some more simple CSS to style whats in the tables.
Full on standards based, non-table sites are possible commerically, but can be a lot harder to do with little prior knowledge, and a good stepping stone is certainly a form of hybrid layout using bits of both.
Though XHTML isn't meant as a straight forward replacement for HTML4.01, I think HTML will eventually die off in favour of XHTML. Some sites can achieve a 50% reduction in code size when moving to fairly full XHTML based coding. In itself, XHTML is only meant to be a stepping stone towards full on XML. I think XHTML will survive there as going to full XML requires a fair bit of extra knowledge to use well, its less intuitive and more extreme, and therefore less accessible to people wanting to make sites.
Posted 04 February 2004 - 11:24 AM
I'm a speed freak when it comes to web page design. I was sold on the code reduction aspects of XHTML the first time I tried it.
Posted 04 February 2004 - 11:28 AM
Since Adrian also mention Jeffrey Zeldman, I've got a pretty decent book of his that I picked up at Amazon. It's entitled "Designing with Web Standards". It gives you a good foundation for XHTML/CSS. And as Adrian indicated, he is pretty concerned about standards, but also being realistic.
That might be a good place for you to start. I found it to be a pretty easy read and quite helpful getting a grasp on the major concepts.
Posted 04 February 2004 - 11:38 AM
Also check out Sitepoint's HTML Utopia: Designing without Tables using CSS. It's a great book.
One of my favorite CSS design sites is CSSZenGarden.com. Of course there's some browser compatibility issues if you use Opera, but I love the concept of designing without tables. They really showcase what you can do w/ CSS design.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users