SitePoint Sponsor

User Tag List

View Poll Results: What kind of HTML Quotes do you use ?

Voters
34. You may not vote on this poll
  • "

    32 94.12%
  • '

    1 2.94%
  • [Both]

    1 2.94%
  • [No quotes]

    0 0%
Page 2 of 2 FirstFirst 12
Results 26 to 28 of 28
  1. #26
    SitePoint Member
    Join Date
    Dec 2003
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use double quotes as well.

  2. #27
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    From http://www.juicystudio.com/tutorial/...ttributes.asp:
    Attribute values should always be placed in single or double quotes, regardless of the data type. The following snippets of XHTML, all legally define an image called logo.gif, which is in a sub-directory called images. The image has a width of 100 pixels, and a height of 50 pixels.
    So if you're writing in XHTML you do have to use quotes.

    Quote Originally Posted by mdshort
    I don't agree with the rest of you. The most browser efficient way to quote or define html is transversal. There is no ONE quote you use, because this would overlap. Heres an example of what I use.

    HTML Code:
    <img height=0 width=0 src="image.jpg">
    And for server side scripts I would use:
    PHP Code:
    <?php echo '<img height=0 width=0 src="image.jpg">'?>
    I don't usually program in php, but that is how I do my quotes. For asp I would reverse it and just use:
    Response.Write "<img height=0 width=0 src='image.jpg'>"
    This allows for non-overlapping tags that would cause errors, which also goes for JavaScript. This is what I have found over the years of programming, don't bother visiting my website to see, its messed up at the moment.

  3. #28
    Beer Monster -Ox's Avatar
    Join Date
    Apr 2003
    Location
    sowth afreeka
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in older version, I used to be sloppy and use no quotes, but like vgarcia said for XHTML its a absolute YES I only used to use quotes where I had to for instance <a href=index.html title="words with spaces">link</a>

    but since XHTML, ive become a much less lazy *** and found out that its so much easier to just use them from the start
    My postings are a natural product.
    The slight variations in spelling and grammar enhance its
    individual character and beauty and in no way are to be
    considered flaws or defects - http://www.guinnesspig.net


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
  •