Jump to content

Use of Doctypes


MikeFloutier

Recommended Posts

Hi,I just realised that I'm probably using the wrong doctype in my web pages but after reading loads of stuff I'm still a little unclear how to proceed.I'm writing my files in HTML and sticking to this site's guidance. I use a style sheet in the main but occasionally use inline styling in an html tag where I want this to override the stylesheet in an isolated instance.My questions are:1. Should I be using the HTML strict or transitional DTD?2. I'm using xhtml1 strict (for some reason - lol) at the moment. It seems to work; what harm is it doing?ThanksMike

Link to comment
Share on other sites

It doesnt really matter. You can use either or. XHTML isnt really.. hard to do. Mostly you just need to add / to the end of tags that dont have a closing tag :). So, you do what you want! I have had issues where when I use a certain DTD it messes with the HTML alot, and I had to get rid of it. I doubt that the consumers really care if your web page is validated.

Link to comment
Share on other sites

thats a dangeruos attitude reportings, how do you think HTML ended up as tag soup or IE has so little regard for standards???Personally, I advise you to use XHTML strict...it is HTML without the needless mess. Use CSS to style for pages and use XHTML to structure them.And always validate your pages, it is a good habit to have and you are less likely to have "un-explainable" glitches in your pages from one browser to the next.

Link to comment
Share on other sites

thats a dangeruos attitude reportings, how do you think HTML ended up as tag soup or IE has so little regard for standards???Personally, I advise you to use XHTML strict...it is HTML without the needless mess. Use CSS to style for pages and use XHTML to structure them.And always validate your pages, it is a good habit to have and you are less likely to have "un-explainable" glitches in your pages from one browser to the next.
Thanks,But I think I put too much info around my real question which was:Should I be using "strict" or "transitional"; bearing in mind that I'm using a seperate stylesheet but with occasional "inline styling" for odd events?Mike
Link to comment
Share on other sites

no but 110(pop3) and 443(ssl) and 25(smtp) are also blocked.why 21? I don't have ftp setupI have to do some more testing when I get home. Everything is still functioning the same internally...outside access just stopped working.

Link to comment
Share on other sites

I suggest you use traditional, strict is, well, too strict :)
no, strict is the recommended way of doing it. Transitional is for instances when you need to use a depreciated tag like <embed> or you don't want to take the extra time to write strict code. IMO if you are going to use transitional XHTML you might as well stick with HTML.
Link to comment
Share on other sites

Yup. Strict rules! Strict forever! :) Only in Strict can one get the strict CSS behaviour, even though without the MIME type that's not much of deal, but that's another story... in all cases: use strict.By the way, aspnetguy, it doesn't really matter what port you choose to run your web server from, as long as that port is opened and the web server is the only application using that port. I mean, that's what Apache's "Listen" directive is for- selecting a port to use. Every self respecting server (not only web server) has the option to change the port it's on.

Link to comment
Share on other sites

no, strict is the recommended way of doing it. Transitional is for instances when you need to use a depreciated tag like <embed> or you don't want to take the extra time to write strict code. IMO if you are going to use transitional XHTML you might as well stick with HTML.
I haven't read much doctypes, so I'm not that of an expert, but XHTML 1.0 Strict has all those rules, like you can't use a depracted tag or an attribute. Why do I need to involve JS just because I want the <a> target to be _blank or something like that?I don't want to use all these rules, but still want to have a valid XHTML document.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...