ejaboneta Posted March 6, 2009 Share Posted March 6, 2009 I asked my client if he wanted html or xhtml and he asked... what does google want? So what does goole like better? Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/ Share on other sites More sharing options...
Daniel0 Posted March 6, 2009 Share Posted March 6, 2009 In regards to SEO it's completely irrelevant. There are other considerations to take when choosing between XHTML and HTML though. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-778565 Share on other sites More sharing options...
ejaboneta Posted March 6, 2009 Author Share Posted March 6, 2009 Alright thanks. I read somewhere that if the site doesn't validate, google might throw it out. Is this true? Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-778568 Share on other sites More sharing options...
jackpf Posted March 6, 2009 Share Posted March 6, 2009 In regards to SEO it's completely irrelevant. There are other considerations to take when choosing between XHTML and HTML though. Just out of wonder, what are they? I only stick with XHTML because it sounds cooler than HTML I've never actually researched the specific differences. I obviously know that it's cleaner, stricter, and requires shorttags, but that's it... And no, I don't think google will "throw your site out". However, I've heard that bad code could affect your page rank. And really bad code can result in google not being able to parse your page. So it's definitely worth having valid code, whether it's html or xhtml... Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-778569 Share on other sites More sharing options...
fabrydesign Posted March 6, 2009 Share Posted March 6, 2009 Alright thanks. I read somewhere that if the site doesn't validate, google might throw it out. Is this true? Not necessarily "throw it out"- it needs to index it to throw it out. Invalid code might cause it to not be indexed at all. ...but you should be coding valid code anyway. In terms of HTML vs. xHTML, I'd go with xHTML, because it is the new standard. Unless you have some reason to stick to HTML. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-778570 Share on other sites More sharing options...
Mchl Posted March 6, 2009 Share Posted March 6, 2009 In terms of HTML vs. xHTML, I'd go with xHTML, because it is the new standard. And when HTML5 comes out, you'll move again? Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-778572 Share on other sites More sharing options...
Daniel0 Posted March 6, 2009 Share Posted March 6, 2009 Alright thanks. I read somewhere that if the site doesn't validate, google might throw it out. Is this true? Only Google themselves could tell for real, but I seriously doubt this is the case. Many websites do not validate yet rank just fine. Nevertheless, you should always make sure your markup validates. In regards to SEO it's completely irrelevant. There are other considerations to take when choosing between XHTML and HTML though. Just out of wonder, what are they? I only stick with XHTML because it sounds cooler than HTML I've never actually researched the specific details. I obviously know that it's cleaner, stricter, and requires shorttags, but that's it... Well, first of all, Internet Explorer does not support XHTML at all. According to the W3C specifications, for a page to be rendered as XHTML it must be served as application/xhtml+xml, however, if you do this to Internet Explorer the user will simply be prompted to download the page because IE doesn't know what to do with it. If you serve it as text/html then it will be parsed as HTML, not XHTML, by the browser and you are as such not really using XHTML even if you have an XHTML DOCTYPE and use XHTML syntax. Secondly, due to XHTML being based on XML, you will have to deal with its draconian error handling. This means that upon finding even the slightest syntactical error in the markup, the parser will halt and present an incredibly unfriendly parse error message to the user, i.e. render the entire page useless. This of course only happens when you actually serve it as XHTML using the Content-type header though. XHTML is neither cleaner nor stricter than HTML. The HTML 4.01 Strict DTD is just as strict as the XHTML 1.0 DTD. I'm not sure what you mean by cleaner though. I don't see why it's cleaner. If you use true XHTML then you will already have blocked off the majority of internet users (i.e. users who use Internet Explorer) and you risk very easily making your pages entirely unusable to the rest of your users. If you don't serve it as XHTML then it'll not be treated as XHTML and you could just as well have written it as HTML. In terms of HTML vs. xHTML, I'd go with xHTML, because it is the new standard. Unless you have some reason to stick to HTML. That's plain simply incorrect. They're both being worked on alongside each other. XHTML is in no way a replacement for HTML. There are a lot of misconceptions about XHTML and HTML based on cleanliness, strictness, newness, coolness, whateverness, etc. Most of it is entirely untrue and shows that many people do not truly understand the technologies they are using. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-778586 Share on other sites More sharing options...
jackpf Posted March 6, 2009 Share Posted March 6, 2009 That's quite interesting really. Well, currently I conform to XHTML 1.1 basic standards. It displays fine on IE; I guess it's being interpreted as html. And as for the cleaner part; I thought you didn't have to necessarily close tags in the right order in HTML? Whereas if you close tags in the wrong order in xhtml, you're flooded with errors. And the shorttags make sense as well. Idk, it just seems neater to me... Anyway, thanks for explaining. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-778602 Share on other sites More sharing options...
dropfaith Posted March 15, 2009 Share Posted March 15, 2009 And as for the cleaner part; I thought you didn't have to necessarily close tags in the right order in HTML? Whereas if you close tags in the wrong order in xhtml, im pretty sure thats not right html tags need to be closed in order as well or your flooded with errors Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-785048 Share on other sites More sharing options...
TheFilmGod Posted March 17, 2009 Share Posted March 17, 2009 I discourage coding for XHTML simply because its "cooler." HTML and XHTML are equally as powerful. Only use XHTML if you forsee using XML in the near future. I know I will. XML has some powerful sorting abilities, and enables a program to code a piece of code with custom tags and use XML to transform the highly customized and reader-friendly code to plain mambo jumbo html. ha ha. I don't really mean that - I just like using that word. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-786465 Share on other sites More sharing options...
jackpf Posted March 17, 2009 Share Posted March 17, 2009 Well, I don't just code in xhtml because i prefer it (which I do anyway) but because I code other sorts of stuff in xml, such as a firefox extension I just developed. xml is way more versatile; it's just the language that I'm used to, so I code my site in it... Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-786593 Share on other sites More sharing options...
Mchl Posted March 17, 2009 Share Posted March 17, 2009 Well, I don't just code in xhtml because i prefer it (which I do anyway) but because I code other sorts of stuff in xml, such as a firefox extension I just developed. xml is way more versatile; it's just the language that I'm used to, so I code my site in it... Which can be translated to: "I don't code in XHTML because I prefer it, but because I prefer it" Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-786956 Share on other sites More sharing options...
jackpf Posted March 18, 2009 Share Posted March 18, 2009 No, I don't JUST code in xhtml because I prefer it. There are other reasons too, which I stated above... Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-787556 Share on other sites More sharing options...
Mchl Posted March 18, 2009 Share Posted March 18, 2009 Chill... I was just nitpicking a bit Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-788027 Share on other sites More sharing options...
waynew Posted March 18, 2009 Share Posted March 18, 2009 COME ON THERE'S AN X IN IT FOR GOODNESS SAKE! CAN'T WAIT FOR XPHP! Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-788090 Share on other sites More sharing options...
Daniel0 Posted March 18, 2009 Share Posted March 18, 2009 XPHP, Extensible PHP? Is that the same as PECL? Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-788093 Share on other sites More sharing options...
waynew Posted March 19, 2009 Share Posted March 19, 2009 Now that's wha- am talkin' bout. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-788311 Share on other sites More sharing options...
alphanumetrix Posted March 19, 2009 Share Posted March 19, 2009 Google should render both fine; however, depending on how BAD your HTML is, the GoogleBot can throw your script out. If there is no way for the GoogleBot to read it, there is no way for it to read it... it's simple. XHTML will always be read clearly by the GoogleBot, so I would say just go with that. As a general rule, you should always go with XHTML (unless you're sending e-mails or something). Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-788515 Share on other sites More sharing options...
Daniel0 Posted March 19, 2009 Share Posted March 19, 2009 As a general rule, you should always go with XHTML (unless you're sending e-mails or something). Why? I think you'll need to back up that claim. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-788563 Share on other sites More sharing options...
alphanumetrix Posted March 20, 2009 Share Posted March 20, 2009 As a general rule, you should always go with XHTML (unless you're sending e-mails or something). Why? I think you'll need to back up that claim. It's good practice. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-789099 Share on other sites More sharing options...
Mchl Posted March 20, 2009 Share Posted March 20, 2009 Says who? Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-789195 Share on other sites More sharing options...
Daniel0 Posted March 20, 2009 Share Posted March 20, 2009 As a general rule, you should always go with XHTML (unless you're sending e-mails or something). Why? I think you'll need to back up that claim. It's good practice. I beg to differ... My reasoning is here: http://www.phpfreaks.com/forums/index.php/topic,241805.0.html Now I'd like your reasoning. You didn't back up your claim, you just repeated yourself. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-789200 Share on other sites More sharing options...
redarrow Posted March 21, 2009 Share Posted March 21, 2009 daniel0 already said the truth in the matter from the beginning, xhtml vs html well sorry html win's why? Think about it in a financial aspect as well. We all no that html works fine, so off course they had to invent the wheels again, it called money ( books,collages,teachers teaching some think new) Also ever body has different taste in programming/scripting, the idea that closing all open tags, was a grate way off saying, hay there we go more money. now days buy a html book, your see html advertising the grate xhtml, (come on please buy me). It the buz word for xhtml, it cleaner smarter looks better , well far as i am concerned html is just as smart as xhtml even smarter. It also comes down to competition in the browser world, one want's to be better then the other (( that also comes down to money)). why would we even think that xhtml is better then html. It called advertising new buz words. So adding the theme of closing all tags, and adding a few short commands makes xhtml more powerful or better NO wrong. The truth off the matter is that xhtml is the opposite it made problems for it self, xhtml is application based, like it mother xml. The difference from html and xhtml are massive as compatibility goes. you rely need to go back as daniel demostrated to understand the concept between the two technology s Never judge a book buy it cover . and buy the way it not wrong to no either xhtml or html or xml just remember html wins. Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-790254 Share on other sites More sharing options...
waynew Posted March 21, 2009 Share Posted March 21, 2009 Look, can we just all agree on the fact that XHTML sounds dangerous!? Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-790409 Share on other sites More sharing options...
alphanumetrix Posted March 21, 2009 Share Posted March 21, 2009 As a general rule, you should always go with XHTML (unless you're sending e-mails or something). Why? I think you'll need to back up that claim. It's good practice. I beg to differ... My reasoning is here: http://www.phpfreaks.com/forums/index.php/topic,241805.0.html Now I'd like your reasoning. You didn't back up your claim, you just repeated yourself. I thought I'd explained it well. Is this a debate club or a php forums? (lol... scratch that. HTML VS XHTML... duh. bad rationalization) If you're a developer, as the guy above obviously is, using XHTML is good practice. Odds are, someone's going to request it, and being intimately familiar with it makes it that much easier. I personally (personally) see XHTML & HTML as the difference between right and wrong... I'm not a good guy necessarily, but I try to make good habits (get it?). Quote Link to comment https://forums.phpfreaks.com/topic/148301-xhtml-vs-html/#findComment-790424 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.