Re: where did they find this: "(W3C) recommends lowercase attributes/attribute values in their HTML

Discussion in 'HTML' started by Eric Bednarz, Nov 3, 2010.

  1. Eric Bednarz

    Eric Bednarz Guest

    Mike S <> writes:

    > […] w3schools is a pretty decent site with a lot of
    > good information


    I always found it a really terrible site with lots of totally wrong
    information.

    > http://www.w3schools.com/html/html_attributes.asp
    >
    > HTML Tip: Use Lowercase Attributes
    >
    > Attribute names and attribute values are case-insensitive.


    In SGML this is not really about case sensitivity but case folding;
    luckily HTML 4 has nothing to do with ISO 8879 short of the normative
    reference.

    There are three forms of attribute values in HTML 4:

    1) Case sensitive (CDATA)
    2) Everything else
    3) Those cases where the normative prose contradicts the normative
    syntax and consequently 1) and 2) (e.g. the ID attribute)

    > However, the World Wide Web Consortium (W3C) recommends lowercase
    > attributes/attribute values in their HTML 4 recommendation.


    Where, exactly (it’s not an ISO standard, for the better or worse, you
    can read it too, for free)?
     
    Eric Bednarz, Nov 3, 2010
    #1
    1. Advertising

  2. Eric Bednarz

    Mike S Guest

    Re: where did they find this: "(W3C) recommends lowercase attributes/attributevalues in their HTML 4 recommendation"

    On 11/3/2010 4:39 PM, Eric Bednarz wrote:
    > Mike S<> writes:
    >
    >> […] w3schools is a pretty decent site with a lot of
    >> good information

    >
    > I always found it a really terrible site with lots of totally wrong
    > information.
    >
    >> http://www.w3schools.com/html/html_attributes.asp
    >>
    >> HTML Tip: Use Lowercase Attributes
    >>
    >> Attribute names and attribute values are case-insensitive.

    >
    > In SGML this is not really about case sensitivity but case folding;
    > luckily HTML 4 has nothing to do with ISO 8879 short of the normative
    > reference.
    >
    > There are three forms of attribute values in HTML 4:
    >
    > 1) Case sensitive (CDATA)
    > 2) Everything else
    > 3) Those cases where the normative prose contradicts the normative
    > syntax and consequently 1) and 2) (e.g. the ID attribute)
    >
    >> However, the World Wide Web Consortium (W3C) recommends lowercase
    >> attributes/attribute values in their HTML 4 recommendation.

    >
    > Where, exactly (it’s not an ISO standard, for the better or worse, you
    > can read it too, for free)?


    Interesting reply, thanks. I wasn't stating the last sentence, I was
    quoting it from the w3schools site, I should have used quotation marks.
    I did read through it and I didn't see that claim made anywhere, that's
    why I asked. So I learned that the site is not entirely reliable. Thanks.
     
    Mike S, Nov 4, 2010
    #2
    1. Advertising

  3. Eric Bednarz

    cwdjrxyz Guest

    Re: where did they find this: "(W3C) recommends lowercaseattributes/attribute values in their HTML 4 recommendation"

    On Nov 3, 7:18 pm, Mike S <> wrote:
    > On 11/3/2010 4:39 PM, Eric Bednarz wrote:
    >
    >
    >
    > > Mike S<>  writes:

    >
    > >> […] w3schools is a pretty decent site with a lot of
    > >> good information

    >
    > > I always found it a really terrible site with lots of totally wrong
    > > information.

    >
    > >>http://www.w3schools.com/html/html_attributes.asp

    >
    > >> HTML Tip: Use Lowercase Attributes

    >
    > >> Attribute names and attribute values are case-insensitive.

    >
    > > In SGML this is not really about case sensitivity but case folding;
    > > luckily HTML 4 has nothing to do with ISO 8879 short of the normative
    > > reference.

    >
    > > There are three forms of attribute values in HTML 4:

    >
    > > 1) Case sensitive (CDATA)
    > > 2) Everything else
    > > 3) Those cases where the normative prose contradicts the normative
    > >     syntax and consequently 1) and 2) (e.g. the ID attribute)

    >
    > >> However, the World Wide Web Consortium (W3C) recommends lowercase
    > >> attributes/attribute values in their HTML 4 recommendation.

    >
    > > Where, exactly (it’s not an ISO standard, for the better or worse, you
    > > can read it too, for free)?

    >
    > Interesting reply, thanks. I wasn't stating the last sentence, I was
    > quoting it from the w3schools site, I should have used quotation marks.
    > I did read through it and I didn't see that claim made anywhere, that's
    > why I asked. So I learned that the site is not entirely reliable. Thanks.


    Although lower case is not necessary for most code in html to work, it
    is necessary for much of xhtml, especially if an xhtml page is served
    properly as application/xhtml+xml. Unfortunately perhaps over 90% of
    xhtml pages are mis-served as html because they use the
    extension .html which is reserved for mime type text/html on most
    servers. Thus to serve true xhtml, you have to assign another
    extension, such as .xhtml, to mime type application/xhtml+xml on the
    server. When properly served, an xhtml page is parsed by a very strict
    xml parser rather than the rather loose html one because an xhtml
    paged may contain xml, html, or a mixture of both. XML devices will
    tolerate nearly no errors, and everything must be closed in xml.

    Using upper case for much html may cause no problems, and also is not
    found to be an error at the w3c validator. However I write both xhtml
    and html pages. I like to use lower case for both. Otherwise I have to
    remember I am writing a xhtml page and I must not use upper case as
    some do when writing an html page. Although making errors in case may
    be stupid, many hard-to-find page problems can result from such simple
    things. It should be noted that Javascript does require some use of
    upper case.It has a set of rules that differ somewhat from html. Thus
    when using Javascript on a xhtml page, you often have to enclose the
    script between Cdata begin and end tag to indicate that the script is
    not xhtml, or using an external script file often will work.
     
    cwdjrxyz, Nov 4, 2010
    #3
  4. Eric Bednarz

    Mike S Guest

    Re: where did they find this: "(W3C) recommends lowercase attributes/attributevalues in their HTML 4 recommendation"

    On 11/4/2010 2:19 PM, cwdjrxyz wrote:
    > On Nov 3, 7:18 pm, Mike S<> wrote:
    >> On 11/3/2010 4:39 PM, Eric Bednarz wrote:
    >>
    >>
    >>
    >>> Mike S<> writes:

    >>
    >>>> […] w3schools is a pretty decent site with a lot of
    >>>> good information

    >>
    >>> I always found it a really terrible site with lots of totally wrong
    >>> information.

    >>
    >>>> http://www.w3schools.com/html/html_attributes.asp

    >>
    >>>> HTML Tip: Use Lowercase Attributes

    >>
    >>>> Attribute names and attribute values are case-insensitive.

    >>
    >>> In SGML this is not really about case sensitivity but case folding;
    >>> luckily HTML 4 has nothing to do with ISO 8879 short of the normative
    >>> reference.

    >>
    >>> There are three forms of attribute values in HTML 4:

    >>
    >>> 1) Case sensitive (CDATA)
    >>> 2) Everything else
    >>> 3) Those cases where the normative prose contradicts the normative
    >>> syntax and consequently 1) and 2) (e.g. the ID attribute)

    >>
    >>>> However, the World Wide Web Consortium (W3C) recommends lowercase
    >>>> attributes/attribute values in their HTML 4 recommendation.

    >>
    >>> Where, exactly (it’s not an ISO standard, for the better or worse, you
    >>> can read it too, for free)?

    >>
    >> Interesting reply, thanks. I wasn't stating the last sentence, I was
    >> quoting it from the w3schools site, I should have used quotation marks.
    >> I did read through it and I didn't see that claim made anywhere, that's
    >> why I asked. So I learned that the site is not entirely reliable. Thanks.

    >
    > Although lower case is not necessary for most code in html to work, it
    > is necessary for much of xhtml, especially if an xhtml page is served
    > properly as application/xhtml+xml. Unfortunately perhaps over 90% of
    > xhtml pages are mis-served as html because they use the
    > extension .html which is reserved for mime type text/html on most
    > servers. Thus to serve true xhtml, you have to assign another
    > extension, such as .xhtml, to mime type application/xhtml+xml on the
    > server. When properly served, an xhtml page is parsed by a very strict
    > xml parser rather than the rather loose html one because an xhtml
    > paged may contain xml, html, or a mixture of both. XML devices will
    > tolerate nearly no errors, and everything must be closed in xml.
    >
    > Using upper case for much html may cause no problems, and also is not
    > found to be an error at the w3c validator. However I write both xhtml
    > and html pages. I like to use lower case for both. Otherwise I have to
    > remember I am writing a xhtml page and I must not use upper case as
    > some do when writing an html page. Although making errors in case may
    > be stupid, many hard-to-find page problems can result from such simple
    > things. It should be noted that Javascript does require some use of
    > upper case.It has a set of rules that differ somewhat from html. Thus
    > when using Javascript on a xhtml page, you often have to enclose the
    > script between Cdata begin and end tag to indicate that the script is
    > not xhtml, or using an external script file often will work.


    So far I have been able to do everything I need with HTML PHP, CSS and
    javascript, I didn't know that document.getElementById would cause an
    error without using CDATA in XHTML, thanks for mentioning that, in case
    I run into it in a future project.
     
    Mike S, Nov 5, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dotnetforfood
    Replies:
    3
    Views:
    341
    dotnetforfood
    Jul 4, 2004
  2. Frank
    Replies:
    9
    Views:
    1,580
    David Dorward
    May 3, 2004
  3. 123Jim
    Replies:
    11
    Views:
    835
    123Jim
    May 2, 2010
  4. Lewis
    Replies:
    1
    Views:
    410
    Jukka K. Korpela
    Nov 9, 2010
  5. dotnetforfood

    Homeland Security Agency recommends abandoning IE

    dotnetforfood, Jul 2, 2004, in forum: ASP General
    Replies:
    3
    Views:
    128
    dotnetforfood
    Jul 4, 2004
Loading...

Share This Page