Forum Moderators: phranque

Message Too Old, No Replies

Using .htm and .html extensions and changing to XHTML for future?

Please help.

         

frenzy77

12:50 pm on Jun 3, 2005 (gmt 0)

10+ Year Member



Hi everyone:)

I have a few questions.

Q.1. I was wondering if i built up pages with the extension .htm and then have one page with the extension .html (home page) does it matter?
>Any problems with doing that? Will it still work ok?

>>**Or should i change them all to one extension?

(I have a main page that states it is:

<doctype... xhtml 1.0 transitional>

the rest of my pages are not.)

Q.2. Do i use the <doctype html... html 4.1...transitional>
for the rest if they are not xhtml standards?

Q.3. Also i've read that people should start learning
how to code using xhtml. Is that really necessary?

Q.4. If i don't start coding my pages with xhtml, will i need to change them in the future? I have
read that xhtml will replace html in the future.

Q.5. If i don't change them now, will the pages be affected later by browsers not being able to display them because of the replacement of html with xhtml?

Q.6. If i have some html tags such as the <img> tag,
should i add the closing forward slash even if my
pages are not totally xhtml?

Q.7. Will this work for or be *valid* for closing the tag if i use the:

<doctype html....blahblah...transitional...>

at the top of the webpage?

*Example of <img> tag:

<img src="abc.jpg" alt="..." />

Please answer each question:)
Thank you very much for your help.

frenzy77

httpwebwitch

1:34 pm on Jun 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



q1: yes that will work fine. you can mix & match extensions as long as your server knows what to do with them. You could create a website with all the files named "*.qqq" so long as your server knows how to serve those to the client

q2: yes

q3: yes

q4: maybe. presumably if you use a depreciated doctype, you can continue using "old-style" HTML. However there is no promise and we can't assume that new devices (PDAs, cellphones) will support old quirks

q5: probably not. new browsers will still want to be able to display pages made in the 1990s - see q4

q6: can't hurt, so why not?

q7: yes

faltered

12:37 am on Jun 4, 2005 (gmt 0)

10+ Year Member



Frenzy: I just made the transition from HTML to XHTML over the past few weeks. It wasn't as bad as I had hyped it up in my mind to be. Go to W3C and read up on the differences. If you're going for XHTML transitional, then your pages shouldn't need much tweeking to go from valid HTML to valid XHTML.

If you're using strict, well then that's another ball game.

httpwebwitch

8:33 pm on Jun 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



moving to strict XHTML is tricky because you have to end all your stub tags: <img/> <br/> <input/> etc.

But you know, you only have to close your tags if you want your document to validate. I recently changed a whole site to STRICT just to make my CSS positioning problems go away. I didn't go through every page and end all my <br>s.

though some day when I have the time, I will. :)

I know those pages won't validate by W3C standards, but now they render identically in all browsers without any "quirks". No browser I know of will crash if your <p>s don't have </p>s

httpwebwitch

8:42 pm on Jun 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oh, I'm sorry.

I'm not using XHTML. Shame on me for saying so.
I'm using Strict HTML4.

this is my DOCTYPE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

I won't edit my previous post, I'll admit I made a mistake

faltered

1:46 pm on Jun 8, 2005 (gmt 0)

10+ Year Member



My understanding is that the difference between XHTML 1.0 transitional and strict is that strict does not allow any style attributes to be applied to elements. Transitional gives you some leeway there.

So until you're a CSS superstar, I'd say go for transitional. If you want your page to validate, you'll just need to add the ending tags to your elements as previously mentioned and make sure you specify alt tags for everything.

Good luck.