SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XHTML and browser compatibility?

    OK, I like the sound of XHTML and would like to give it a go in the future, but if I start coding to conform with 'XHTML Transitional' standards today, am I going to be hit with a barrage of browser compatibility problems like I was a year or two ago when using CSS? Perhaps someone has seen a recent good article on this issue that they can point me to?

    Thanks
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  2. #2
    SitePoint Addict five40's Avatar
    Join Date
    Jul 2001
    Location
    Imatra, Finland
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not turning to XHTML now ?

    I don't think XHTML has same kinds of problems than CSS. XHTML documents can be viewed even with older browsers if you mark them by XHTML rules. Check out this
    Webreview's tutorial for starters.
    "-Surely you can't be serious ?
    -Yes I am serious...and don't call me Shirley."

  3. #3
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Straight from the horse's mouth: http://www.w3.org/TR/2001/WD-xhtml1-...04/#guidelines. That descripes more stuff about browser compadibility and XHTML that you'd ever want to scroll through. Anyway, it's pritty simple, realy:

    ∙ put a space for empty emilents and the closing tag: <br />, or <hr />. Don't use the full markup on empty elmiments, like <br></br>, or <hr></hr>, but why would you do that anyway?

    ∙ Use external scripts and stylesheets to aviod problems with the [CDATA] stuff.

    ∙ Use both the id and name attributes like <a id="blah" name="blah">Ian Glass Realy Helped Me Out With This</a>.

    ∙ Shorthand boolen attributes are the only trubble I run into regurlaerly. So I've just changed to an opt-in stratigy.

    ∙ Type &amp;amp; instead of &amp; in your query strings.

    And, that should do it for most things. I know the dilemia you're facing, but for XHTML-Trans it's realy not that big a deal. I'd start using it on your next project. Now, I just wish that XHTML 1.1 was so easy, but alas...

    ~~Hope This Helps

  4. #4
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys - I feel more confident now about giving it a go.
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  5. #5
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XHTML and browser compatibility?

    XHTML is totally backwards compatible. You won't have any problems with old browsers they will just ignore the added tags and /'s
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  6. #6
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, I'm giving it a go...

    What's the best way to deal with an 'old' bgsound tag in an XHTML compliant way?

    Eg: <bgsound src="sounds/squash.wav" LOOP="2" />

    I _think_ that <object> is the way to go, but is it possible do it in such a way that my browser doesn't want to load up Windows Media Player in an attempt to play the sound?

    Perhaps someone knows of a web resource that focuses on helping developers like myself move from old (often proprietary) tags to XHTML compliant tags?

    Thanks
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  7. #7
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But wait, there's more (and probably more to come... )

    My next question relates XHTML friendly positioning of elements on a page.

    Before, I'd do something like
    <p>
    <table>
    ...

    to put a space before a table.

    Now, for XHTML and cross-browser compatibility, should I be doing this

    <table style="padding-top:30px">
    ...

    or perhaps
    <img src="spacer.gif" width="100" height="30" alt="" />
    <table>
    ...

    Any other suggestions?
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  8. #8
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Me again...

    XHTML and javascript now!

    Using the XHTML validator at validator.w3.org the HTML I'm working on converting to XHTML transitional is throwing up a bunch of errors over a javascript I got recently from Dynamic Drive.

    What do I do in a situation like this?

    1. Try to live without the javascript?
    2. Try to 'fix' the javascript to the best of my limited java-scripting abilities?
    3. Did I read something recently that said that it's possible to link the javascript from an external file (which may or may not fix the problem), or was I just hallucinating at the time?
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  9. #9
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe the XHTML way likes to have things externally. This goes for CSS as well as JavaScript. Put your JavaScript into an external js file and call it from the page coding.

  10. #10
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by htmlite
    I believe the XHTML way likes to have things externally. This goes for CSS as well as JavaScript. Put your JavaScript into an external js file and call it from the page coding.
    Thanks - I just found a good reference on this subject here: http://www.xhtmlguru.com/article9.htm
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  11. #11
    Don't eat yellow snow spaceman's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    1,039
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by spaceman
    OK, I'm giving it a go...

    What's the best way to deal with an 'old' bgsound tag in an XHTML compliant way?

    Eg: <bgsound src="sounds/squash.wav" LOOP="2" />

    I _think_ that <object> is the way to go, but is it possible do it in such a way that my browser doesn't want to load up Windows Media Player in an attempt to play the sound?
    Scott, the 'XHTML Guru' (www.xhtmlguru.com) says...

    "I know bgsound is not valid XHTML. I don't know what its replacement is. The
    two choices are <object> and <embed>, but I don't know how to get background
    music to play without a media player embedded in the page. Sorry."
    Web Design Perth Melbourne .:. Itomic Business Website Solutions
    Drupal Experts .:. Drupalise

  12. #12
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    external js is really similias to linking a css just use this in the head tag

    <script language="javascript" type="text/javascript" src="yourname.js">

    </script>

    and then create the js file called yourname.js in the same directory...
    Regular user


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
  •