Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Results 1 to 7 of 7

Thread: The purpose of XHTML

  1. #1
    ForumJoiner is offline Member
    Join Date
    Mar 2007
    Posts
    50

    Default The purpose of XHTML

    A HTML file should obey the rules of writing HTML files, but not always does.
    A XHTML file must obey the rules of writing HTML files, plus a few others.


    A XHTML file that obeys the above rules is called a “well-formed” XHTML file.
    A XHTML file that is “well-formed” and its structure conforms to the rules set by W3C is called a valid XHTML file.


    W3C is an organization who sets standards for writing XHTML files. Standards are necessary for the browsers on the market to have similar behavior when interpreting the same XHTML file.


    Validating a file means to check that file to see if it is well formed and valid. To validate your file / web page, please this official link.

  2. #2
    Join Date
    Feb 2007
    Posts
    122

    Default

    The problem is that the most used browser on the market is not standards compliant. In fact, IE has added some functionality to their browser that is proprietary that other browsers don't, nor could they, make use of. While it would be great if everyone would use a standards compliant browser (Firefox, Netscape, or Opera), it won't happen for quite some time. So, because of this, and our need to have our sites visited by every person possible, we must work 5 or 6 times harder getting our sites to work in all browsers, and then spend countless hours trying to make certain that it is compliant.

    Here's what I did. I began using tableless layouts, for a single page I would spend about 30 minutes in the design process, then about 10 to 15 hours in the coding process, and another hour validating it. I would have to make sacrifices to the look of my page so that the page would work in IE. Sometimes I would come to a single problem in browser differences that took me 8 to 10 hours to figure out, so you could add that time on top of that. Usually I would end up just getting rid of that functionality, and moving on.

    What I do now. F*** IE. They have forced my hand, now I use tables to layout a page. I spend about 30 minutes in the design phase, 1 to 2 hours coding(usually far less), and I about 5 minutes validating the code.

    I used to tell people that their sites would be easier to recode and fix if they used proper elements in their coding. Now I tell people that that's BS. Why, because if it takes me an extra 10 minutes to find my way around a page's code, that doesn't come close to comparing to the extra 20 hours I spent making a page more readable and compliant with the w3c standards. The moral? Use tables. It doesn't matter what some consortium thinks about my site, 99.5% of the users that visit my site will never ever look at the code. If my site looks good in all browsers, that's all that I care about. As long as it functions properly. Plus, my CSS is much easier to read, and believe it or not, so is my HTML. (I hate hacks)

  3. #3
    ForumJoiner is offline Member
    Join Date
    Mar 2007
    Posts
    50

    Default

    I agree that CSS programming can be more difficult than table-based. I also know sites (please PM me for details) which look good in IE and FireFox, but not in Opera. I also know for a fact that Google search page itself is coded in HTML + tables for layout.


    I come to the conclusion that considering the common part of the standard each browser accepts, it is possible to design a site using a standard set of tags. About this, I will comment more on the CSS forum.


    As for XHTML, compared to HTML, I try, whenever possible to use / to plan to use XHTML because the rules to obey are stricter. In the long run, it means those even browsers that are not fault-tolerant can read my code. IE tolerates a HUGE array of mistakes, the most obvious one being the lack of <body> tag, but the IE’s code is bigger than the code of a browser used in a cell phone, for instance. In other words, a cell-phone browser might not have enough space to implement fault-tolerant code, therefore it might read properly only valide XHTML code.


    I love to see people arguing about the use of XHTML and I believe anyone interested can make his/her own opinion looking at the arguments, and choosing the best method for a particular application / timeframe.

  4. #4
    Join Date
    Feb 2007
    Posts
    122

    Default

    I completely agree with you. I actually do use CSS for my table layouts, but the reason that I do use tables, and the reason it's easier, is because tables are quite predictable. If you see a table behaving a way that it's not supposed to, it will more than likely not be behaving in any browser, so the fix is usually quite easy. vBulletin and SMF also make extensive use of tables. Joomla, on the other hand, works well in IE and FF(I don't know about Opera or Netscape), and doesn't use a single table anywhere. If what I was designing a script that would be used by hundreds or even thousands of sites, I might reconsider using CSS as a means of laying out, much like Joomla has.

    But on a single site? I don't think that the rewards outweigh the cost.

    As far as validating my XHTML, I still do that, but have found that it's easier to do when you use simpler layouts, like those done with tables. One thing that I have found about XHTML, if a character is used, for instance the ampersand "&", it won't validate. Instead, you must use &amp;(I think). Well, if you are working with PHP, then you must make certain that all of the unacceptable characters are converted first, and that doesn't seem worth it just to comply when what you are complying with doesn't make sense(Why can't you use &?). As for everything else, I always try to validate the code.

  5. #5
    ForumJoiner is offline Member
    Join Date
    Mar 2007
    Posts
    50

    Default

    If you see a table behaving a way that it's not supposed to, it will more than likely not be behaving in any browser, so the fix is usually quite easy.
    If you want, I can send you a PM, with an example of a table looking the same in IE and FireFox, but different in Opera.

  6. #6
    Join Date
    Feb 2007
    Posts
    122

    Default

    Oh geeze, I don't know if I want you too. I haven't been testing in Opera for some time now....Now I'm kinda scared to look.....(bites nails)....

  7. #7
    ForumJoiner is offline Member
    Join Date
    Mar 2007
    Posts
    50

    Default

    I am very interested in an example where HTML tables were easier to implement than CSS. Please PM me a link or code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. xhtml information?
    By temi in forum XHTML Forums
    Replies: 5
    Last Post: 05-28-2008, 05:56 AM
  2. If u Use XHTML
    By shaun in forum XHTML Forums
    Replies: 0
    Last Post: 11-30-2007, 10:06 AM
  3. html 4.0 or xhtml 1.0 ?
    By OldDarkstarAccount in forum General Webmaster Talk
    Replies: 0
    Last Post: 01-08-2007, 01:08 PM

Bookmarks

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124