Jump to content

HTML XHTML? Any difference?


cs.punk
 Share

Recommended Posts

  • Replies 151
  • Created
  • Last Reply

Top Posters In This Topic

W3C Schools != W3C 

 

W3C's authority doesn't come from the fact it introduces any changes. It comes from the organisations that form it.

 

And the ''new' changes' are not introduced just for the sake of it. They're introduced because industry demands them.

 

Just saying something doesn't prove it.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...
  • 3 months later...
  • 3 months later...

I use 'XHTML 1.0 Transitional' as text/html merely because it enforces me to close every tag that has been opened and compose a much neater code.

 

I think OCD kicks in when I try 'HTML 4.01 Transitional' and tags such as '<img>' are not closed as I'd like them to be '/>'.

 

I use xhtml the exact same way as html only with additional closed tags.

Link to comment
Share on other sites

  • 1 month later...
  • 5 weeks later...
  • 1 month later...

    * XHTML elements must be properly nested

    * XHTML elements must always be closed

    * XHTML elements must be in lowercase

    * XHTML documents must have one root element

In HTML, some elements can be improperly nested within each other, like this:

<b><i>This text is bold and italic</b></i>

In XHTML, all elements must be properly nested within each other, like this:

<b><i>This text is bold and italic</i></b>

Link to comment
Share on other sites

  • 6 months later...

In a nutshell, XHTML is the same as HTML but with a few differences that make it more "robust":

  • All tag names must be lowercase - i.e. <html> instead of <HTML>)
  • All elements must have corresponding closing tags - i.e. <p>paragraph</p> instead of <p>paragraph
  • Elements without closing tags should use /> - i.e. <br /> and <img src="..." /> instead of <br> and <img src="...">
  • All attributes must be in quotes - i.e. <span class="test">something</span> instead of <span class=test>something</span>
  • All attributes that are used must have values - i.e. <option selected="selected"> instead of <option selected>

 

Question: I use SELECTED and often times don't give my attributes values. I code in HTML (not XHTML). Can I get away with doing this coding in either?

Link to comment
Share on other sites

  • 2 weeks later...

XHTML is the same as HTML but with a few differences that make it more "robust":

All tag names must be lowercase - i.e. <html> instead of <HTML>)

All elements must have corresponding closing tags - i.e. <p>paragraph</p> instead of <p>paragraph

Elements without closing tags should use /> - i.e. <br /> and <img src="..." /> instead of <br> and <img src="...">

All attributes must be in quotes - i.e. <span class="test">something</span> instead of <span class=test>something</span>

All attributes that are used must have values - i.e. <option selected="selected"> instead of <option selected>

 

Link to comment
Share on other sites

  • 2 months later...
What separates pros from amateurs is that the former group knows why and when to use a specific tool. Just saying.

 

 

What separates pros from amateurs is that the former group often needs to reassure themselves and that they are not the latter group by being unnecessarily condescending to the former group.

Anyone else sick of admins and their over the top hubris? You passed on a perfect opportunity to help someone learn something so you could lay down that half assed troll.

 

Douche bag.

 

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...

Important Information

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.