21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 878 Views |
-
HTML Development Guidelines (correction needed)

4 April 2010 at 8:28am Last edited: 4 April 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!
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. -
Re: HTML Development Guidelines (correction needed)

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>
</div>but, this is not cool:
<DIV CLASS="MYAWESOMECLASS">
<P>THERE is Some CAPITALISED text here</P>
</DIV> -
Re: HTML Development Guidelines (correction needed)

5 April 2010 at 6:38am Last edited: 5 April 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.
-
Re: HTML Development Guidelines (correction needed)

7 April 2010 at 12:44pm Last edited: 7 April 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.
| 878 Views | ||
|
Page:
1
|
Go to Top |



