Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
What is HTML vs xHTML Strict vs Transitional
Old 09-19-2007, 03:44 PM What is HTML vs xHTML Strict vs Transitional
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
I'm far from a "standardista" to use a phrase LadyNRed coined. And I don't know if it matters that much in the end because my site is WordPress. But a lot of what I picked up here is finally starting to sink in a little. I think I caught a pretty good idea what kind of stuff to avoid (tables) and some other ways to get around the problem.

It all leaves one big gaping hole though. I'm not really sure about the boundaries from HTML to xHTML Transitional to xHTML Strict? Not just where the cut off is but situations where one is a better choice than the other? Do people just pick transitional because it's in the middle most of the time?

I kind of think I have an idea, that HTML is just anything, Transitional is no font tags to force people using CSS, and Strict is valid XML? Or am I off base? Can anyone help me realize the intent behind them? I've read a bunch of tech docs on the subject, but they're kind of over my head.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-19-2007, 03:56 PM Re: What is HTML vs xHTML Strict vs Transitional
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Using HTML 4.01 Strict would be acceptable too, it forces you to clean up your code and tolerates little sloppiness. XHTML Transitional is the XML version of HTML Transitional, and IMO, there's no good reason to be using a Transitional Doctype of any flavor. Transitional is for lazy coders.

XHTML Strict forces you to completely separate content from presentation, it prevents you from using moldy old deprecated tags and attributes (like target= etc.) and forces you to keep your code clean.

Quote:
HTML 4.01 Strict. HTML 4.01 Strict is a trimmed down version of HTML 4.01 that emphasizes structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed in HTML 4 Strict. By writing to HTML 4 Strict, authors can achieve accessible, structurally rich documents that easily adapt to style sheets and different browsing situations. However, HTML 4 Strict documents may look bland on very old browsers that lack support for style sheets.

... XHTML 1.0 Strict. XHTML 1.0 Strict is an XML version of HTML 4 Strict.
Theres more here, in-depth:
http://www.oreillynet.com/pub/a/java...8/doctype.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 04:08 PM Re: What is HTML vs xHTML Strict vs Transitional
Defies a Status

Posts: 3,420
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Transitional is for lazy coders
Like me Newbie I'm still getting to grips with XHTML/HTML and CSS so I'm not going to jump in at the deep end for the time being. If I was to code professionally for someone though, I believe XHTML Strict is only the real way to go
CSS4Life is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 04:11 PM Re: What is HTML vs xHTML Strict vs Transitional
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Transitional is for lazy coders.
Naturally that would explain why so many people are using it. Ack! I'm one of them! I think I have a new challenge and mental exercise to fix it.

I think I'm more confused now than when I started. I didn't realize there was HTML Strict and HTML Transitional. I thought it was just the three choices in the subject line. So is it anything xHTML is XML (meaning all the tags close and all the attributes are quoted) but transitional and strict and regular are all about what tags can show up in the document?

Whenever you think you know everything is when you stop asking questions. Lucky thing I've got a head like a dry sponge.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 04:17 PM Re: What is HTML vs xHTML Strict vs Transitional
Extreme Talker

Posts: 238
Location: United States
Trades: 0
The two main differences between XHTML and HTML is that XHTML elements need to be properly nested (so <div><p>text</div></p> is not acceptable, <div><p>text</p></div> is acceptable) and all XHTML elements need to be closed (this includes elements like img, hence the closing slash: <img src="example.gif" alt="example"/>). In other words, XHTML needs to be "well-formed". So in theory, XHTML (Strict, Frameset, and Transitional) is supposed to be in XML format.

The whole goal of separating content from presentation applies to both HTML and XHTML. This includes not using tables for presentation, <font>, align=, bgcolor=, etc., and instead using CSS. The definitions of XHTML, as defined by the W3C was a little more refined in this goal, as XHTML as a whole is a little more strict in the terms of which elements are allowable and which are not.

The difference between XHTML strict and transitional is that XHTML transitional is just a little bit more liberal. It still contains the same rules for being well-formed. I view XHTML transitional (and its HTML counterpart, HTML loose) as a markup that's to be used when X/HTML strict and CSS fail to do the job. This was more the case when browsers were much worse with rendering and following standards than they are today. In most cases today, there is generally a way to do something in XHTML and CSS that will work in all of the important browsers, so I personally don't think XHTML transitional is needed anymore, and I doubt that it will be included in XHTML 2.
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
frost is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 04:21 PM Re: What is HTML vs xHTML Strict vs Transitional
Extreme Talker

Posts: 238
Location: United States
Trades: 0
Quote:
Originally Posted by Learning Newbie View Post
So is it anything xHTML is XML (meaning all the tags close and all the attributes are quoted) but transitional and strict and regular are all about what tags can show up in the document?
I would agree with that. Except that there is no regular XHTML. Just strict, transitional, and frameset. Frameset is for pages with frames, and frames are deprecated in strict (I think).
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
frost is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 04:58 PM Re: What is HTML vs xHTML Strict vs Transitional
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Wow, great information frost! I owe you some TP - I spread too much out in the past 24 hours but will come back to say thanks.

Here's a question for everybody. Since the target="_blank" trick doesn't work any more, and I use that sometimes for external links on my blog, is javascript window.open(URL); the way to go? Will the other site see mine as a referral in their stats? I'd have to write some code like this, right?

Code:
<a href="www.example.com" onclick="window.open('www.example.com');">text</a>
Then I can send people off to have a look at a different page to find out more details about something I cover, without loosing them in the middle of my article? I think if I'm gonna use a site as a reference they deserve some credit for it.

Oh and a big thanks to everyone! It's alive - I'm starting to get it.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 08:01 PM Re: What is HTML vs xHTML Strict vs Transitional
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
is javascript window.open(URL); the way to go?
Yes, unobtrusive javascript is the way to do that.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 10:26 PM Re: What is HTML vs xHTML Strict vs Transitional
blue-dreamer's Avatar
King Spam Talker

Posts: 1,222
Location: Middle England
Trades: 0
With a "usability" head on I'd say that normal links should open in the same browser window - let the user decide how they want to open it. You can always offer two links and tell the user which one opens the new window so the user has an on-screen choice.
blue-dreamer is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 11:21 PM Re: What is HTML vs xHTML Strict vs Transitional
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
I think one of the times a to open a pop up is for information to add into a form. Not to have a visitor leave your site but stay on it at the same time.
joder is offline
Reply With Quote
View Public Profile
 
Old 09-20-2007, 03:18 AM Re: What is HTML vs xHTML Strict vs Transitional
killdude69's Avatar
Average Talker

Posts: 24
Name: Brandon Miller
Trades: 0
I would go with xHTML 1.0 Strict, it keeps you from doing things such as: (e.g. if you were writing a deffinition list, <dl><dt>bla bla bla</dt><dd>bla bla bla bla</dd><br /><a href="site.com">bla</a></dl> would be wrong. It keeps you from putting content out of the tags, all content in a deffinition list should be in the deffinition tags. Therefor, making sure it does not create visual errors in any browser.
__________________
Huhh, well, you screwed up this time dumby.

Free PHP BBCode parser & inserter:
Please login or register to view this content. Registration is FREE
killdude69 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to What is HTML vs xHTML Strict vs Transitional
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.45052 seconds with 12 queries