Check Syntax & HTML 5

88 views
Skip to first unread message

Bill

unread,
Feb 23, 2012, 3:23:32 PM2/23/12
to BBEdit Talk
So, in a HTML 5 document I created an ordered list with <ol> and </
ol>, hit Check Syntax and got the message "No errors were found".

Then I tried <ol type="A">, and Check Syntax said "Document type
doesn't permit attribute “type” within element “<ol>”". When I viewed
the list in a browser it appeared, as expected, with letters instead
of numbers.

I think <ol type="A"> is valid in HTML 5. I have relied on Check
Syntax many times before, but now it appears to choke on changing the
type in an ordered list.

Any suggestions?

Bucky Junior

unread,
Feb 23, 2012, 9:32:18 PM2/23/12
to bbe...@googlegroups.com
From what I understand, HTML 5 likes a lot of things relegated to CSS styling. It has to do with content organization as opposed to content styles. That includes a lot of things that were easy to put in as you've done. It render fine (usually) but doesn't comply with the syntax checking.

For example, look at these snippets.
<ol style="list-style-type: upper-roman;">

or put them in a CSS style sheet or definition in the header.

ul.a {list-style-type: circle;}
ul.b {list-style-type: square;}

ol.c {list-style-type: upper-roman;}
ol.d {list-style-type: lower-alpha;}

This from <http://www.w3schools.com/css/css_list.asp>

I know. Picky. Picky. Change in the rules.

Best,
Bucky

pr10n

unread,
Feb 23, 2012, 11:49:00 PM2/23/12
to BBEdit Talk
the ol type attribute was deprecated in HTML 4.01 but was revived in
HTML5. What Bill is trying to do is perfectly valid HTML5 markup.

http://www.w3.org/TR/html4/struct/lists.html#edef-OL
http://www.w3.org/TR/html5/grouping-content.html#attr-ol-type

On Feb 23, 7:32 pm, Bucky Junior <buckyjunior...@googlemail.com>
wrote:

Bucky Junior

unread,
Feb 24, 2012, 12:30:18 PM2/24/12
to bbe...@googlegroups.com
Hmmm. I guess I haven't been up to date on the moving targets of W3C Recommendation for html4 or html5. Recommendation 4.01 seems to still be in recommendation status since December since 1999.

I work with someone from another planet who says 80% is good enough. If this person can get it to render in IE, it's good enough. This alien doesn't use BBEdit.

I'm guessing that Bare Bones is slightly behind the moving target of HTML5 with its syntax checker. I also use http://http://validator.w3.org/ to check my syntax if there is a question. Of course, it continues to be a recommendation in progress.

Best,
Bucky

Bill Roberts

unread,
Feb 26, 2012, 3:00:05 PM2/26/12
to bbe...@googlegroups.com
Thanks to Bucky Junior and to pr10n for their comments.

For now I will use CSS when I want to change the marker in an ordered list in HTML 5. I will also raise the Check Syntax issue with BBEdit.
--
Bill Roberts


Reply all
Reply to author
Forward
0 new messages