SitePoint Sponsor

User Tag List

Page 8 of 11 FirstFirst ... 4567891011 LastLast
Results 176 to 200 of 265
  1. #176
    SitePoint Guru cyjetsu's Avatar
    Join Date
    May 2008
    Posts
    814
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well that is what I mean. I want to make sure I have all closing tags, which a html strict validation would not pick up on, but an xhtml strict would. So then when I put the html.strcit-dtd back on, my closing tags will still validate as html strict.

  2. #177
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Omitting certain tags is allowed in HTML4 (but not XHTML1). Leaving out a </p> tag is not an error, but forgetting a </table> tag is.
    Birnam wood is come to Dunsinane

  3. #178
    SitePoint Guru cyjetsu's Avatar
    Join Date
    May 2008
    Posts
    814
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Even though I have decided to use html4strict now I prefer to keep all closing tags, just because I think they should be there for semantic purposes, it is also easier to see where nested elements end and begin, and also if I ever decide to convert to xhtml I will only have to add a slash to closing empty elements instead instead of adding masses of closing tags to multiple elements.

    So validate with xhtml strict, clean up all errors besides closing slash on empty elements, then slap on the html4strict dtd back. Done.

  4. #179
    SitePoint Member Dirty Dog's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow this is great, Thanks i've been looking for something like this.

  5. #180
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is preference and why? HTML 4 Strict or XHTML 1.0 Strict? I'm considering switching to HTML 4.0... not sure why, perhaps for a change of scenery. Then again, many people are under the illusion if you don't use XHTML you suck, so in that regards it could make potential clients turned off... So many pros and cons to both.

  6. #181
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    What is preference and why? HTML 4 Strict or XHTML 1.0 Strict?
    My recommendation is HTML 4.01 Strict at this time. Internet Explorer still has a huge market share and it doesn't support XHTML in any way, shape or form.

    If you need to mix in content from XML namespaces like MathML or SVG, then use XHTML 1.0 Strict (served as application/xhtml+xml, of course).

    Quote Originally Posted by rochow View Post
    Then again, many people are under the illusion if you don't use XHTML you suck, so in that regards it could make potential clients turned off...
    The irony is that virtually none of these people actually use XHTML. They use invalid HTML (written as XHTML) and rely on browser bugs and error handling.
    Birnam wood is come to Dunsinane

  7. #182
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't *need* XHTML as it's served as HTML, so really it does the same thing and is in no way better.

    Haha yes, keeping in mind they're paying (I freelance full-time) so losing them over something as silly as a doctype would be stupid I could always switch it to XHTML if they so desire, take 5 minutes.

  8. #183
    SitePoint Zealot Aimhigh's Avatar
    Join Date
    Jul 2008
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is very informative and helpful. Actually i posted yesterday asking what is the difference between XHTML and HTML and r937 pointed me on this thread.

  9. #184
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Yes, check FAQ's before posting, some questions can be answered and it helps when starting a thread.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  10. #185
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    Haha yes, keeping in mind they're paying (I freelance full-time) so losing them over something as silly as a doctype would be stupid I could always switch it to XHTML if they so desire, take 5 minutes.
    and the majority of the clients probably don't even know why they ask for xhtml - it's just something they've heard they have to have I think :-)

  11. #186
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    It's just like smiley faces, such as X_x or something other then a simple .

    They look cooler. Same with XHTML, it has the X in there which makes it seem spicier. (My theory, take it, or chuck it out).
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  12. #187
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So:
    Code:
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
    when used in a normal .html document will be outputted as
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    for ie6?

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    as a .xhtml and HTTP request would render 'real' xhtml?

    Meaning ie would not be able to handle these documents.

    Funny enough, if ie6 is rendering 'fake' xhtml as html then it is pointless to even claim to use xhtml.

  13. #188
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Funny enough, if ie6 is rendering 'fake' xhtml as html then it is pointless to even claim to use xhtml.
    Which is sorta everyone's point about why not to use XHTML, because it's just HTML anyway.

  14. #189
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    Which is sorta everyone's point about why not to use XHTML, because it's just HTML anyway.
    Fake 'xhtml' is html but real xhtml is real xhtml

    Rochow, if you already have not read this, do so.
    http://hixie.ch/advocacy/xhtml

    This is a great read as well

  15. #190
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    So:
    Code:
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
    when used in a normal .html document will be outputted as
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    for ie6?
    I don't understand your question.
    The meta element will be the same for all browsers. It's generally ignored anyway, since servers usually do send a real Content-Type HTTP header. If not, only the encoding information matters, since you cannot change the MIME type with a meta element.

    Quote Originally Posted by cooper.semantics View Post
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    as a .xhtml and HTTP request would render 'real' xhtml?
    Er ... ?
    If you save it as .xhtml and open it from the hard drive, then Firefox, Opera and Safari will render it as real XHTML (provided you use the correct xmlns attribute in the <html> tag). The doctype declaration isn't even necessary, and neither is the XML declaration if you use UTF-8.

    If served via HTTP, the MIME type and the xmlns attribute are what matters. The XML declaration is necessary if you use anything other than UTF-8 or UTF-16 and the server doesn't send any encoding information. The doctype declaration is unnecessary for XML documents, since browsers use non-validating parsers and XML documents are always rendered in standards mode.

    Quote Originally Posted by cooper.semantics View Post
    Funny enough, if ie6 is rendering 'fake' xhtml as html then it is pointless to even claim to use xhtml.
    If you serve a document as text/html you cannot claim to use XHTML, because it is HTML by definition (RFC 2854).
    Birnam wood is come to Dunsinane

  16. #191
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    I don't understand your question.
    This answered my question:
    Quote Originally Posted by AutisticCuckoo View Post
    The meta element will be the same for all browsers. It's generally ignored anyway, since servers usually do send a real Content-Type HTTP header. If not, only the encoding information matters, since you cannot change the MIME type with a meta element.
    I think a huge misconception to 'developers' is that:
    If this MIME type is used application/xhtml+xml in a normal .html document it makes it xhtml, which is false. A real xhtml file is as you quoted above.

  17. #192
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    	<head>
    		<meta http-equiv="Content-Type" content="Content-type:application/xhtml+xml; charset=utf-8" />
    This is a better example of what I am talking about.

    Just because 'someone' is to use this, does not make it real xhtml. I think a lot of people think that just because the DOCTYPE + MIME Type are used as so, this is xhtml. Do you see what I am saying?

  18. #193
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I understand. Just to make it clear for future readers of this thread, this is what makes an XHTML document be XHTML:
    1. The server must send a Content-Type HTTP header with a MIME type of application/xhtml+xml, application/xml or text/xml.
    2. The <html> tag must have this exact attribute: xmlns="http&#58;//www.w3.org/1999/xhtml".

    Nothing else matters. Not the XML declaration, not the doctype declaration, not any meta element.
    Birnam wood is come to Dunsinane

  19. #194
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    Fake 'xhtml' is html but real xhtml is real xhtml

    Rochow, if you already have not read this, do so.
    http://hixie.ch/advocacy/xhtml

    This is a great read as well
    Read it before. Never encountered any of those problems.

    I was saying in regards to:
    Funny enough, if ie6 is rendering 'fake' xhtml as html then it is pointless to even claim to use xhtml.
    So I was talking about XHTML delivered as plain HTML (not actual XHTML)

  20. #195
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,603
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by rochow View Post
    So I was talking about XHTML delivered as plain HTML (not actual XHTML)
    So why not just refer to that as HTML rather than confusing the issue by mentioning XHTML at all.

    As Tommy pointed out:

    The server must send a Content-Type HTTP header with a MIME type of application/xhtml+xml, application/xml or text/xml
    in order for it to be XHTML. What the doctype says is irrelevant to whether it is HTML or XHTML and an HTML page with an XHTML doctype is still just HTML.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  21. #196
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So,
    Code:
    <meta http-equiv="Content-Type" content="Content-type:application/xhtml+xml; charset=utf-8" />
    pretty much is mere rubbish?

  22. #197
    SitePοint Troll disgracian's Avatar
    Join Date
    Aug 2006
    Location
    Samsara
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is overrided by the webserver, but what if you didn't get the document from a webserver?

    Cheers,
    D.

  23. #198
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by disgracian View Post
    It is overrided by the webserver, but what if you didn't get the document from a webserver?

    Cheers,
    D.
    The meta element will be the same for all browsers. It's generally ignored anyway, since servers usually do send a real Content-Type HTTP header. If not, only the encoding information matters, since you cannot change the MIME type with a meta element.
    This pretty much answered my question, Tommy helps out even when hes probably sleeping now

  24. #199
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    Tommy helps out even when hes probably sleeping now
    At the time you posted I was backing my Jeep® out of the garage.
    Birnam wood is come to Dunsinane

  25. #200
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,603
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by disgracian View Post
    It is overrided by the webserver, but what if you didn't get the document from a webserver?

    Cheers,
    D.
    Then the browser uses its default which will probably mean that anything that isn't in the 128 standard ASCII characters will display incorrectly.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •