Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

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

HTML Development Guidelines (correction needed)

Go to End

4 Posts   1241 Views


Community Member, 49 Posts

4 April 2010 at 8:28am

Edited: 04/04/2010 8:49am

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!

_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.
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.


Community Member, 253 Posts

4 April 2010 at 11:40am

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>

but, this is not cool:

<P>THERE is Some CAPITALISED text here</P>


Community Member, 49 Posts

5 April 2010 at 6:38am

Edited: 05/04/2010 6:45am

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.


Forum Moderator, 5523 Posts

7 April 2010 at 12:44pm

Edited: 07/04/2010 12:44pm

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.