1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Is it OK to use "double quotes" in code like this?!

Discussion in 'HTML & Website Design' started by tayiper, Mar 15, 2007.

  1. #1
    I mean for example for XML declaration, is it allowed to use:

    <?xml version="1.0" encoding="windows-1250" standalone="yes"?>
    Code (markup):
    instead of:

    <?xml version='1.0' encoding='windows-1250' standalone='yes'?>
    Code (markup):
    I am just interested if it's allowed or not since I mostly use "double quotes" throughout the website.


    thanks, tayiper
     
    tayiper, Mar 15, 2007 IP
  2. DeLaVega

    DeLaVega Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have to use double quotes :)

    I don't know if singles quotes are allowed, but double are fine :)
     
    DeLaVega, Mar 15, 2007 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    For XML, double quotation marks are required. You'll also want to put a space between the last attribute and the closing tag. :)

    I also recommend AGAINST using Windows-1250 as the character encoding, since that uses Microsoft's character set. If someone is viewing your Web page or application on a Mac or Linux machine, they're going to have problems. Especially if their computer is set to display a language other than English. Try using UTF-8 or UTF-16 instead.
     
    Dan Schulz, Mar 15, 2007 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    I've said this before and I'll say it now, though I wonder why since you don't listen.

    You do not use an xml declaration on an html document. XHTML served as text/html is an html document, not xml. The declaration is worse than useless as it causes IE6 to render in quirks mode where it is even less compliant than usual.

    gary
     
    kk5st, Mar 15, 2007 IP
  5. DeLaVega

    DeLaVega Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You're right, but He just asked about double quotes :)
     
    DeLaVega, Mar 15, 2007 IP
  6. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #6
    He doesn't need any quotes at all, because he shouldn't have the xml declaration there in the first place. :) It's been an exercise in futility to help with x-browser stuff, and he won't get rid of the cause of most of his issues.

    cheers,

    gary
     
    kk5st, Mar 15, 2007 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Don't ask why I'm playing devil's advocate, I just am.

    What makes you think he's using this as part of an XHTML document? Just because it's part of a Web site does not mean it's going to be part of the XHTML output. Furthermore, are you so sure this is for general consumption? What if it's for an intranet that uses a REAL browser for the client-side interface (like FireFox, Opera, Konqueror, or Safari)?

    Just something to keep in mind (this could also be part and parcel of an XML schema too, nobody but the OP really knows).
     
    Dan Schulz, Mar 16, 2007 IP
  8. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #8
    Dan, view the past issues brought by the OP. The fact that he's concerned about IE indicates the docs are not served as xhtml; well, that and the meta http-equiv[1]. The fact that he hasn't removed the xml declaration when expressly told that it's a part of his x-browser issues, …

    cheers,

    gary

    [1] See this discussion that's going on now.
     
    kk5st, Mar 16, 2007 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Ah. I haven't been able to connect to DP at times so I guess I missed out. :(

    As it is I'm still trying to track down all the threads I posted in so I can finish what I started. :)
     
    Dan Schulz, Mar 17, 2007 IP
  10. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #10
    Yeah kk5st you're right, in this case I don't listed since doing it so (i.e. using the XML declaration) is a sort of a personal preference or even an "obsession" of mine (if I may call it like that); anyways, thanks all for your further replies!!


    tayiper
     
    tayiper, Mar 17, 2007 IP
  11. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #11
    As long as you understand that using it will 1) cause IE6 not to follow the rules, and that x-browser compatibility between IE6 and modern browsers will be made even more difficult, and 2) mark you as an amateur web developer, do as you will.

    gary
     
    kk5st, Mar 17, 2007 IP
  12. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #12
    Yeah, luckily the only effect (as a result of the "quirks mode") in IE seems to be that it moves the content from the middle to the left (which is not so drastic/critical), nothing else!!


    tayiper
     
    tayiper, Mar 18, 2007 IP