Re: quotes on attributes (was Re: Unwanted space and quoting attributes)

by Liz Bartlett <khyri(at)idyllmtn.com>

 Date:  Tue, 04 Mar 2003 14:29:39 -0800
 To:  hwg-critique(at)hwg.org
 References:  adelphia
  todo: View Thread, Original
I agree - because there are cases where attributes must be quoted,
and XHTML requires it, I always quote them.

It requires a little extra work to escape the quotes in your
PHP source code, but it's worth it for the standards compliance.
After a while, you get used to typing:

        print ("<a href=\"" . $url . "\">This link</a>");

If your class was a few summers ago, it might have been before this
became as significant as it is today.

:)

--Liz

At 09:41 AM 3/4/03 -0800, Nathan Young wrote:

>Definitely a good idea to quote attribute values.
>
> - If an attribute value must have a space in it, it MUST be quoted.  So you 
>can't have a rule "don't quote attribute values" and stick to it 
>consistently.
> - XHTML (HTML formatted in such a way that it can validate as XML) must have 
>attributes quoted.
>
>--->N
>
>3/4/2003 7:58:31 AM, "Kim Buchsen" <osb12b(at)adelphia.net> wrote:
>
>>Hi Michael,
>>
>>Thanks for the suggestions.  I removed the align=left and quoted all
>>attributes and it still is not removing that blasted space.
>>
>>I took a class in PHP programming at the University a few summers ago and
>>the prof said that it would be good practice to start removing the
>>unnecessary quotes from HTML attributes - even the HTML outside of the PHP
>>coding.  That is why I don't code align="left" anymore.  The sections of the
>>HTML for this particular page that have quoted attributes, were generated by
>>an editor.  The HTML for this particular page is not finished - ie.
>>accessibility, size attributes, validation etc.  Just trying to find the
>>reason for that blasted space first!  AAUGH!
>>
>>Thanks for your help!
>>Kim
>>
>>
>>
>
>
>
>
>
>---
>(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*
>(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*
>---
>
>
>
>Nathan Young
>N. C. Young Design
>(530)629-4176
>http://ncyoung.com

----------------------------------------------------------------------
Liz Bartlett*http://www.khyri.com/            110 E. Wilshire Ave.#G-1
Idyll Mountain Internet*http://www.idyllmtn.com/   Fullerton, CA 92832
Virtual Dog Show Co-ordinator*http://www.dogshow.com/   (714) 526-5656
Tibetan Mastiff Web Site*http://www.tibetanmastiffs.com/

HTML: hwg-critique mailing list archives, maintained by Webmaster @ IWA