Jump to:

23481 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » HTML Development Guidelines (correction needed)

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1015 Views
  • Johan
    Avatar
    Community Member
    49 Posts

    HTML Development Guidelines (correction needed) Link to this post

    Love the CMS. Just reading through the help docs and found some minor standards mistakes...

    1.) Sean: XHTML 1.1 to me isn’t necessary, HTML 4.01 does the job, and there isn’t any real value of using XHTML over HTML since IE doesn’t serve up xml documents properly anyway. There’s also some absolutely silly standards, like not being able to use _target attributes in an anchor element because it won’t validate if you do. WTF? Javascript is the less favourable way of doing the same thing in XHTML! http://doc.silverstripe.org/doku.php?id=html

    _target attribute is also not allowed in HTML 4.01 (Strict).

    As much as I prefer HTML 4.01 over XHTML, sadly XHTML has become the de-facto standard, thus safer.

    Also does anyone know if HTML5 is supported?

    2)At SilverStripe also use UpperCamelCase for IDs and lowerCamelClass for class names to distinguish between the two easily.http://doc.silverstripe.org/doku.php?id=css#ids_and_classes
    I don't expect to see this changed. But note W3C say "Element and attribute names must be in lower case". This is because XHTML is case sensitive unlike HTML.

  • Pigeon
    Avatar
    Community Member
    243 Posts

    Re: HTML Development Guidelines (correction needed) Link to this post

    Yes, Sean is wrong. XTML 1.0 Strict and XHTML 1.1 do disallow the use of target="_blank" attribute, but so does HTML 4.01 Strict. So really it just depends if you want to make your site validate as Strict or Transitional. HTML 5 is supported by SS. There really is no reason to use XHTML over HTML if you prefer HTML, it's all good.

    However, you are misunderstanding the W3C's rules on attribute and tag names. For XHTML it is the actual tag names and attribute names that must be lowercase, the content of the tags can be in any case.

    For example, this is fine:

    <div class="MYAWESOMECLASS">
    <p>THERE is Some CAPITALISED text here</p>
    </div>

    but, this is not cool:

    <DIV CLASS="MYAWESOMECLASS">
    <P>THERE is Some CAPITALISED text here</P>
    </DIV>

  • Johan
    Avatar
    Community Member
    49 Posts

    Re: HTML Development Guidelines (correction needed) Link to this post

    Thanks for the info Pigeon. Thinking your right regarding the W3C case point though you will see most modern examples of id/class names lower case outside of M$ to avoid silly mistakes.

    Completed reading the help and built a demo site and finding SilverStripe CMS brilliant compared to say Joomla and can not wait to role out a commercial site on it.

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: HTML Development Guidelines (correction needed) Link to this post

    The HTML / CSS guidelines are about 3 years old now and have served us well enough however we are planning an overhaul of those 2 pages in the short - medium term. Similar to the cleanup and work we did on the PHP coding conventions.

    Also does anyone know if HTML5 is supported?

    Sure, SS doesn't require any specific doctypes.

    1015 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.