Jump to content
xisto Community
AvatarMonkeyKirby

What's The Diff Tween Html, Xhtml, And Shtml? thats kind self explanitory

Recommended Posts

HTML is the Hypertext Markup Language. That's where it all started. Back when the world wide web was new, HTML was the only way information got passed between a server and your web browser.

 

HTML typically stores "static" pages. An HTML page does not change, so it's pretty much the same every time you load it. When you go to an HTML file on the Internet, the server just spits out the page to you.

 

(Sometimes HTML files *contain* things that change, like images or scripts, but the HTML file doesn't change until someone goes and changes it.)

 

HTML was all good and well for a while, but eventually it got slightly off-track. HTML 2 came out, followed by HTML 3 and HTML 4. By HTML 4, though, things were getting ugly. The original idea of an HTML file was to contain information, but web browser makers (Netscape, Microsoft) tried to put in a whole bunch of funny features like scrolling and blinking text. In other words, HTML was due for an overhaul.

 

Thus, XHTML was created. And it's still being developed. XHTML 1 was essentially HTML 4, with very minor changes. XHTML 2 is still being worked on right now.

 

The jist of the difference between HTML and XHTML is that XHTML is based on a more logical way of writing web pages. XHTML is written more like a database and less like forum code. To the programmers, XHTML is more meaningful.

 

But it's still just about the same, just newer and better. Not necessarily practical in all situations, but just newer and better.

 

SHTML...well, um...well...

 

SHTML is HTML with server-side includes. This means that the server is actually combining HTML files together (right when you ask for the page). However, I've never actually used SHTML, so I'll leave this reply to someone else. I'd hate to answer incorrectly, after all.

 

Hope that helps!

 

By the way, nice name (>")>

Share this post


Link to post
Share on other sites

Can you please give a code example of a difference between HTML and XHTML?  And also, demonstrate a feature XHTML has that HTML doesn't (if there are any)?  Thanks

<{POST_SNAPBACK}>

Sure. First off, though, I should mention my typographical convention: I type all HTML tags in uppercase while typing all XHTML tags in lowercase. In HTML, case doesn't matter, but XHTML tags must be in lowercase. Also, where I omit closing tags in HTML, I will state whether those tags are optional or invalid. (Someone tell me if I missed any instances :rolleyes:) XHTML examples are only valid when closed the way they are shown. I separate examples in the code with the standard HTML comment notation--this notation is the same for HTML and XHTML.

 

In HTML, various elements have no closing tag. These include <LI>, <P>, <BR>, and <IMG>. Closing tags are optional for the first two, but are invalid for the second two. Here is a comparison of the elements in the two languages:

 

Optional Close Tag:

<!-- HTML --><OL><LI>This is a list item<LI>This is another list item<LI>And yet another item</OL><P>This is a paragraph. It is short.<p>Here starts my next paragraph.<!-- XHTML --><ol><li>This is a list item</li><li>This is another list item</li><li>And yet another item</li></ol><p>This is a paragraph. It is short.</p><p>Here starts my next paragraph.</p>

No Close Tag:

<!-- HTML --><BR><IMG SRC="infiltriticator.jpeg" ALT="A picture of the infiltriticator"><!-- XHTML --><br /><img src="infiltriticator.jpeg" alt="A picture of the infiltriticator" />

Thus, for elements that are optionally closed in HTML, close them in XHTML. For elements that are not closed in HTML, add a slash before the closing bracket. Other than remembering to use lowercase, that's the only difference between HTML 4.01 (the last version of HTML) and XHTML 1.0.

 

One thing I should mention--quite a few elements have been deprecated since HTML 4. This means that a lot of elements are recommended to be taken out. While many features that have been deprecated are still in wide use, better coding practices have come along. Thus, in future XHTML releases, we may see such features dropped. A few of the elements to be removed include <strike>, <u>, and <font>. (These are to be replaced with Cascading Style Sheets.)

 

One new addition to XHTML 1.1 is Ruby markup. However, Ruby appears to be most useful in East Asian languages, so I have relatively little to say about it. Take a look at the Ruby Specification for more details.

 

Having said all this, not much has really changed between HTML and XHTML. Other than changing the way a few tags are coded, most of the underlying language is the same. It is for this exact reason that there is not widespread migration to XHTML--there is no huge benefit for doing so yet.

 

If you do decide to switch to XHTML, though, I highly recommend that you check out some of the websites devoted to that topic. Unfortunately, I have never looked into finding information about XHTML off the web (I learn from these old-fashioned "book" things), though I'm sure someone would be happy to point out a few if you wait here a while.

 

Hope this helps, and please let me know if I've missed anything. Thanks!

Share this post


Link to post
Share on other sites

As far as I can tell, SHTML represents Server-Parsed HTML. I get this sort of an answer from Answers.com. When looking up SHTML on Wikipedia, I get redirected to SSI, Server Side Includes.

Share this post


Link to post
Share on other sites

SHTML is HTMl that allows server side includes.  The "S" may at one point have stood for static, but that is not the case any more.

 

~Viz

<{POST_SNAPBACK}>


I believe that the "S" was required by many servers in the past to tell Apache that the file used Server Side Includes. Just like many hosts are set up to allow PHTML to be used to tell Apache that the PHP parser will be used for the file. Now that SSI is a standard feature on most hosts, many hosts have simply configured Apache to handle the request for SSI without the need to specify SHTML.

 

vujsa

Share this post


Link to post
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...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.