niche Posted June 8, 2012 Share Posted June 8, 2012 (edited) My misery found company in a topic about validating forms under a strict doctype. http://w3schools.inv...showtopic=43842 What are the pros and cons of strict vs transitional? Edited June 10, 2012 by niche 2 Link to comment Share on other sites More sharing options...
Ingolme Posted June 8, 2012 Share Posted June 8, 2012 The pros to Transitional: No need to worry about CSS, you can just use HTML attributes to style everything. iframes are allowed in Transitional which are usually good in web applications.The pros to Strict: The W3C recommends it. The pros to HTML 5: It allows you to use iframes and at the same time is supported by the W3C and will continue to be supported for a whole long time. I recommend using HTML 5 from now on. Link to comment Share on other sites More sharing options...
ShadowMage Posted June 8, 2012 Share Posted June 8, 2012 (edited) The pros to Transitional: No need to worry about CSS, you can just use HTML attributes to style everything.I don't consider that a pro. When I see that sort of thing I consider it a mess. CSS was created for a reason. Transitional allows for a lot of sloppy coding practices. The only real benefit I see with Transitional is the iframes, but as you mentioned, those are allowed in HTML 5 so there is absolutely no reason to use Transitional. Strict, AFAIK, provides better cross-browser support than Transitional. Strict also forces you to be more disciplined with your coding practices, which is always a good thing. I think HTML 5 also enforces a lot of the same rules, but lifts others, like the self closing tags (they are optional now). Personally, I wish the self-closing tags were still required, because I think this:<img src='something.jpg' alt='something'> is sloppy and confusing. It's an opening tag with no closing tag. EDIT: I just remembered that the self-closing tags are XHTML not HTML. Either way, I still wish they were required. Edited June 8, 2012 by ShadowMage Link to comment Share on other sites More sharing options...
Guest So Called Posted June 8, 2012 Share Posted June 8, 2012 I switched to 4.01 strict a few years ago. It's working satisfactorily for me and I do not expect to change anytime soon. Link to comment Share on other sites More sharing options...
Ingolme Posted June 8, 2012 Share Posted June 8, 2012 I've been using HTML 4.01 Strict until a majority of browsers supported HTML 5. I don't see an actual need for the /> on self-closing tags. It's not really a bad practise, in HTML 4.01 the validator gives a warning if you use them. Link to comment Share on other sites More sharing options...
Guest So Called Posted June 8, 2012 Share Posted June 8, 2012 I don't see an actual need for the /> on self-closing tags.It sounds a bit obsessive compulsive. It's not like browsers require it. It satisfies somebody's sense of neatness. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 8, 2012 Share Posted June 8, 2012 It satisfies somebody's sense of neatness.It satisfies the requirement that XHTML needs to be valid XML. Link to comment Share on other sites More sharing options...
ShadowMage Posted June 8, 2012 Share Posted June 8, 2012 It sounds a bit obsessive compulsive. It's not like browsers require it. It satisfies somebody's sense of neatness.So what. Wanna fight about it? Link to comment Share on other sites More sharing options...
Guest So Called Posted June 8, 2012 Share Posted June 8, 2012 (edited) In a way it sort of satisfies my own sense of neatness. I don't mind the < ... /> tags. Edited June 8, 2012 by So Called Link to comment Share on other sites More sharing options...
niche Posted June 10, 2012 Author Share Posted June 10, 2012 Thanks for everyone's help on this topic especially Ingolme, Shadow Mage, So Called, and justsomeguy. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now