469,950 Members | 2,336 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

xhtml extension required for xhtml file?

254 100+
I wanna know whether xhtml extension needed for xhtml file?

if i have xhtml code in a file, can i save that file as index.html ?
Dec 11 '06 #1
3 2420
Paks
13
You only have to save it as a .html-file and not under a special file name.

The biggest difference between HTML and XHTML is:
1) That XHTML is more case-sensitive and only want small letters.
I.E: <p> instead of <P>
2) <br> has turned into <br />
3) XHTML is very distinct about the order of "nestled"-tags,
which means FILO (first-in-last-out)
I.E: <div> <i> <strong>some text</strong> </i> </div>
instead of what was incorrectly accepted as OK in HTML:
<div><i><strong> some text </i></strong></div>
4) And the mandatory XHTML-file should at least contain this:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE Doctype goes here>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Some title</title>
  5. </head>
  6. <body></body>
  7. </html>
Hope this was of some help, there's an simple introduction tutorial at w3schools:
http://www.w3schools.com/xhtml/default.asp

//Paks
Dec 12 '06 #2
drhowarddrfine
7,435 Expert 4TB
You can save it as a html file. If you save it with a xhtml extension then it becomes a xml file and will be treated as such.
Dec 12 '06 #3
only thing is that go to http://www.w3.org and make you side valid for html then you can saved it as html no matter
Dec 14 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

24 posts views Thread by Mohammd M. Hussain | last post: by
32 posts views Thread by jp29 | last post: by
23 posts views Thread by Gustaf | last post: by
22 posts views Thread by Gianni Rondinini | last post: by
5 posts views Thread by Viken Karaguesian | last post: by
4 posts views Thread by musosdev | last post: by
30 posts views Thread by abracad_1999 | last post: by
11 posts views Thread by Kidogg | last post: by
10 posts views Thread by Robert Huff | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.