Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there a difference?

    Does anyone know if I can head directly for XHTML without learning HTML?
    Is there a difference?

  • #2
    Regular Coder jamesicus's Avatar
    Join Date
    Oct 2008
    Posts
    106
    Thanks
    0
    Thanked 11 Times in 10 Posts
    Quote Originally Posted by michelle32145 View Post
    Does anyone know if I can head directly for XHTML without learning HTML? Is there a difference?
    Just my opinions and observations: No reason not too -- the structural requirements of XHTML usually leads to better markup writing habits: http://www.w3.org/TR/2002/REC-xhtml1-20020801/#xhtml

    On the other hand I don't think there is much to be gained in not using HTML 4.01 (but always using strict DTDs to avoid deprecated elements/attributes)

    Here are some other considerations

    James
    Last edited by jamesicus; 10-27-2008 at 03:55 AM.

  • Users who have thanked jamesicus for this post:

    oesxyl (10-27-2008)

  • #3
    New to the CF scene
    Join Date
    Oct 2008
    Location
    Yorkshire
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    Does anyone know if I can head directly for XHTML without learning HTML?
    Is there a difference?
    XHTML:
    <img src="hi.gif" alt="" border="0" />
    HTML:
    <img src="hi.gif" alt="" border="0"></img>

    Name the one big difference.

  • #4
    Regular Coder
    Join Date
    Jul 2006
    Posts
    399
    Thanks
    33
    Thanked 7 Times in 7 Posts
    xhtml is a html document formed like a xml document, to form the document is harder as rules are strict.


    the w3c says:
    What You Should Already Know

    Before you continue you should have a basic understanding of the following:

    * HTML and the basics of building web pages

    If you want to study HTML first, please read our HTML tutorial.


    LOL:
    The id Attribute Replaces The name Attribute

    HTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map. In XHTML the name attribute is deprecated. Use id instead.

    This is wrong:

    <img src="picture.gif" name="picture1" />

    This is correct:

    <img src="picture.gif" id="picture1" />

    Note: To interoperate with older browsers for a while, you should use both name and id, with identical attribute values, like this:

    <img src="picture.gif" id="picture1" name="picture1" />
    Last edited by sybil6; 10-27-2008 at 04:30 PM.

  • #5
    New Coder
    Join Date
    Oct 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    XHTML:
    <img src="hi.gif" alt="" border="0" />
    HTML:
    <img src="hi.gif" alt="" border="0"></img>

    Name the one big difference.
    There is no closing tag for the replacement img tag

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by ifubad View Post
    There is no closing tag for the replacement img tag
    *giggles* Yes, you're right, they're both XHTML representations of the img element, but an honest mistake, I'd bet my profession on


  •  

    Posting Permissions

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