HTML5 site with IE fixes won't render any design under IE9

I have spent the past few hours building a page in HTML5 to test out a responsive CSS framework. It works perfectly in new versions of IE, all WebKit browsers and Firefox, but anything under IE9 and next to nothing is shown.

After a bit of investigating I think it may be because of the media queries not being recognised, although I am using this Modernizr which should apparently solve these problems.

Could someone with a few versions of IE installed take a quick look over my code and see why my site isn’t displaying the same in all versions of IE?

Mike Bull - HTML5 Test

I think that it’s the role attribute selectors that are not being picked up by the older versions of IE, such as:


header[role="banner"]

This problem is coming with lots of HTML 5 tags. For this, You need to include the HTML5 shiv script in order to allow styling of HTML5 elements in older IE browsers.

To use, include the following script in your element above your CSS:

<!–[if lt IE 9]>
<script src=“http://html5shiv.googlecode.com/svn/trunk/html5.js”></script>
<![endif]–>

I wish it will work for you.

You mean apart from the use of a shiv, a doctype and HTML version that’s still in Draft and subject to change at a moments notice, games with IE conditionals to change which STRUCTURAL element is present on the page, completely nonsensical heading orders, nesting of article/section when it’s a case of “which is it?!?”, links that look like they should be inside LISTS, Lists around non-list elements, and a few dozens excess div and classes you either shouldn’t need using the HTML 5 stuff… or HTML 5 tags you shouldn’t need if using DIV? The lack of a media type on your default sheet certainly can’t be helping matters either.

Much less a “CSS framework” – such things typically defeating the POINT of using CSS in the first place – as evidenced by the presentational classes; at which point you might as well go back to writing HTML 3.2

All contributing to the 5.7k of HTML 5 doing 4.6k of HTML 4’s job?

As to layout issues – with the CSS broken up in an unclear fashion over eight separate files… including some sort of framework nonsense I’d hardly find it surprising there are issues. Particularly think the doing the includes in the CSS so even the print one is sent when not being printed is particularly cute. (cute being my word for wasteful)… especially since as it’s not in the

You’ve got a massively oversized reset, a presentational framework defeating one of the reasons to even use CSS, ridiculously large font stacks, unnecessary CSS selectors that don’t exist in those legacy browsers even with the shiv…

… and you’re blowing 132k on that modernizr and jquery garbage that’s being sent to ALL browsers… You’ve got a 146k page and you haven’t even added images yet?!?

The source order of sidebar before the real page content area can’t be a good thing either.

My advice, use a RECOMMENDATION doctype not a DRAFT one if you care about deploying on old browsers, kick that framework nonsense and bloated reset to the curb, ease up on the font stacks, and STOP breaking your CSS up into a dozen files when you need maybe three tops (one for each media target… What you’ve done I’m starting to refer to as Spaghetti CSS)

There is so much wrong with that page I wouldn’t even TRY fixing it if you care about legacy browser support. EVEN if you were to use HTML 5, you’re using it in a confusing non-semantic wasteful manner – and the CSS is such a tangled mess I’d not even TRY to salvage it.

It is an EXCELLENT example of why NOT to use HTML 5 or CSS frameworks though. I may have to refer to this one in the future.

Oh, and your print stylesheet outputs the h1/menu on a page by itself, followed by a blank page, then the content on a third page – not good.

That’s supposedly what modernizr does…

Though that Modernizr’s website full of illegible color contrasts, absurdly undersized fixed metric fonts, broken semantics, AND broken layouts, might not be the best choice for building a site with. But then, I say that about HTML 5 in the first place.

Modernizr should pick that up, but regardless of this I’ve found the problem after trying to validate the screen CSS. For those who toy with CSS frameworks and come across this problem make sure you’re using the EXACT CSS that tools like Modernizr are looking for. In my case, it was because Modernizr wasn’t happy with my RGBA values…

Thanks for the help.

Usually, I’d say that such criticism is overkill for a small issue like “why are there no colours in IE?”, but these criticisms reflect every reason why I was using these frameworks that are largely touted on different development communities.

The page won’t be put into production, nor is it a serious attempt at a design. I built it with the Less grid system and Modernizr as many people on Reddit, as well as large companies like Microsoft and Intel are starting to move their designs towards being more responsive, so that they only require one design for many platforms. I had never touched HTML5/CSS3 before this and if I’m honest it felt okay to develop with, but the entire workflow just feels “incomplete”. I also agree that the setup is largely insane and requires a lot of workarounds that will affect the user more than most developers think. Admittedly, I didn’t do much tidying and as most can see the HTML itself is tiny, with most of the CSS being straight from the framework.

One thing I will disagree with is legacy support. Modernizr and most grid frameworks pride themselves on working well with browsers as far down as IE5. In the end, the page worked fine on IE6 (tested on VM and MultipleIE), apart from a few link issues which should be straightforward to solve. Either way, the page was made as a demonstration to my boss and as it is done I have removed the page. If anyone wants to see roughly what I did download something along the likes of Modernizr and the Less Framework and you’ll get the same sort of examples.

Thanks for being so in-depth with the criticism so that I don’t need to profile or test the layout myself. :slight_smile:

I’ve been hearing that phrase bandied about lately “responsive” – and I’m still going “just what the devil does that even mean?!?”. I fail to see how flushing accessibility, semantics, and caching models down the toilet has ANYTHING to do with a site being “responsive”

Though it SOUNDS like what they are talking about is the POINT of HTML – device neutrality; something that presentational CSS frameworks are the antithesis of; in fact, what they are describing SOUNDS like “accessibility”. Slapping a new word on it and then doing the exact opposite of what it means?!? I don’t get it.

Though given the accessibility of sites from the likes of Microsoft and Intel, much less the unusable inaccessible eye-sore train wreck idiocy known as Reddit, that such things originate with them is hardly surprising.

… and in the process made a page that should only take 9k and make it take 146k on EVERY browser. I currently support all the way back to IE 5 without any of that bloated nonsensical bull. I’ve been doing media targets and width targets for six years without any of that extra garbage – media queries just made it easier.

Just to show you what I mean… I grabbed a copy of your demo last night… and it took me about ten minutes to slap together a workalike that doesn’t need HTML5, doesn’t need scripting assistance, and works just fine all the way back to IE 5.5; It just doesn’t have rounded corners on legacy IE or position:fixed – Oh noes, not that…

XHTML 1.0 Test

as always, directory unlocked:
Index of /for_others/ultimate

… for easy access to the drippy gooey goodness.

It does make some changes – the sidebar comes second, and is set to 40% instead of 30% since at 800 wide that 30% didn’t leave much room for anything. The Max-width is set in EM so large font users get a bit more space to deal with, and it’s min-width locked until the mobile.css trips. Uses 1 CSS file for screen, applies mobile on top of that (which is good since most handheld targets do that anyways, so I added handheld to screen), has that media query for width (I’d back that up with a small quarter k mcswitchy type script on a deployment page), but otherwise is functionally identical to what you had.

EVEN if you stripped away the pointless jquery and modernizr bloat from your original, it was 15k… this rewrite is only 8.2k. Big difference… and it’s better behaved cross browser since your original, well… wasn’t doing all that great in that department.

Apart from your rounded corners, there was no reason to even bother with CSS3; and there was NO reason to even be trying to do HTML 5 with it. Even IF you were to write that with HTML5, the ‘proper’ markup according to it’s rules would be:


<!DOCTYPE html>
<html	lang="en"><head>

<meta
	http-equiv="Content-Type"
	content="text/html; charset=utf-8"
>

<link
	type="text/css"
	rel="stylesheet"
	href="screen5.css"
	media="handheld,screen,projection,tv"
>

<link
	type="text/css"
	rel="stylesheet"
	href="mobile5.css"
	media="handheld, only screen and (max-width:768px)"
>

<link
	type="text/css"
	rel="stylesheet"
	href="print5.css"
	media="print"
>

<title>HTML 5 Test</title>
	
</head><body>

<div id="fixedHeader">
	<header>

	<h1>
		<a href="#">
			HTML 5 Test
		</a>
	</h1>
	
	<nav>
		<ul id="mainMenu">
			<li><a href="#" class="current">About</a></li>
			<li><a href="#">Work</a></li>
			<li><a href="#">Test</a></li>
			<li><a href="#">Contact</a></li>
		</ul>
	</nav>
	
	</header>
<!-- #fixedHeader --></div>

<div id="columnWrapper">
	
	<section id="content">
		<h1>Welcome to the <span>HTML 5 Test</span></h1>
		
		<article>
		
			<h1>Test Title</h1>
			<p>
				Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin lobortis nisl justo, a auctor mauris. stepllus vitae nisl enim. Aenean vitae libero in velit consectetur sagittis. Integer non ante quis massa condimentum adipiscing. Cras posuere lacus at est rutrum nec tempor felis auctor. Nunc lacinia felis eu tellus tristique tincidunt. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed eget libero mauris, sed volutpat libero. Sed oltrices turpis sit amet quam elementum consectetur. Vivamus a nisi nunc. Maecenas vitae oltricies mi. In vitae tellus sodales quam lobortis condimentum sed vel ante.
			</p><p>
				Mauris cursus aliquet nisl at malesuada. Ut mattis, risus ac rhoncus venenatis, purus neque consequat justo, non tincidunt nolla erat in lorem. Nam blandit gravida tempus. Vestibolum tortor tortor, oltrices sed auctor ut, rutrum et quam. Vivamus oltricies mi id enim consectetur eget placerat nisi dapibus. Ut ac justo vitae purus imperdiet suscipit vel tempor ante. Praesent ut nisl mauris, sit amet tincidunt turpis. Aenean a sem non quam feugiat molestie ut volutpat neque. Integer egestas rutrum mauris sit amet porttitor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridicolus mus. Nunc diam enim, polvinar et dapibus sit amet, molestie ut neque. Pellentesque rhoncus, ante eu pellentesque egestas, odio dui iacolis magna, et feugiat mauris lorem ac dolor. Nunc nibh turpis, malesuada ac condimentum non, auctor non quam. Praesent non arcu leo. Curabitur congue nunc id elit commodo vel auctor nisl facilisis. Nollam oltrices nunc sed sapien interdum non varius ligola posuere. Praesent id sapien lacus, nec gravida tortor. Morbi eget oltrices sapien.
			</p><p>
				Donec faucibus sagittis libero in porta. Mauris sed leo risus. Mauris nec leo turpis, vitae polvinar elit. Quisque at est mauris. Sed at eros et nibh hendrerit consectetur. Curabitur accumsan volutpat libero quis dignissim. Aliquam nisl ante, ollamcorper ut pretium eget, aliquet aliquam dolor. Duis vitae scelerisque risus. Duis consequat volputate sollicitudin. Pellentesque dignissim eros ac justo laoreet ac dapibus dui auctor.
			</p>
		</article>
	<!-- #content --></section>
	
	<section id="sideBar">
		<h1>Test Navigation</h1>
		
		<section>
			<h1>Code</h1>
			<p>
				Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
			</p>
		</section>
		
		<section>
			<h1>???</h1>
			<p>
				Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
			</p>
		</section>
		
		<section>
			<h1>Profit</h1>
			<p>
				Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
			</p>
		</section>
		
	<!-- #sideBar --></section>
	
	<footer id="pageFooter">
		<!-- id needed so we can use footer elsewhere on page -->
		<nav>
			<ul>
				<li><a href="#">Home</a></li>
				<li><a href="#">Follow on Twitter</a></li>
				<li><a href="#">Contact</a></li>
			</ul>
		</nav>
		Disclaimer goes here
	</footer>
	
<!-- #columnWrapper --></div>
	
</body></html>

You were wrapping section around article on everything when generally you should be using one OR the other, not both… and no, all those H1 are not a mistake, HTML5 changes the rules for headings so that whenever you open <section> the ‘counter’ of what you should use gets reset to 1. This of course is a means to try and placate the people who could never figure out how to use heading tags properly in the first place… though naturally many HTML 5 devs would be slapping “header” around every heading tag for christmas only knows what reason.

Well, my XHTML 1.0 rewrite should help illustrate just how silly it was even further. If that was for your boss, you can use it to really nail home how pointless HTML 5 is – and LITERALLY how it’s throwing coding practices back a decade or more.

When it comes to IE6 or even IE8, I’m at the point of “oh noes, they don’t get rounded corners” and “IE6- users get a crappy stripe fixed width” – big honking deal. If the page is still functional for them, that’s all I’ll support and thrown massive scripting at them for “pixel perfect” is just a waste of time.

… at the same time, I see no reason a page can’t at least be functional all the way back to IE 5.5 for little to no extra effort. Broken page methodologies, “But I can do it in photoshop”, frameworks that defeat the point of “HTML/CSS/separation of presentation from content”, and train-wrecks of bloated nonsensical idiocy like HTML 5 are more to blame for broken websites than IE has ever been.

After all, HTML 5 seems to exist just to stroke browser makers ego’s, exploit the ignorant with something new and flashy, let a handful of people sell books who cares how far down the garden path they are leading greenhorns, and of course the people who still vomit up HTML 3.2 and slap a tranny doctype on it… Now they just slap the HTML 5 lip service on it instead and bloat out the page with even more pointless crap.

As always, net change zero.

Simply put, a lot of CSS frameworks state that if you plug them in you’ll write next to no code and your site will work in all legacy browsers and will degrade for different devices.

If you need to blame someone for this recent trend it would probably be A List Apart. If I remember correctly it was one of their events that spurred on the whole “CSS grid” thing.

I’m glad you mentioned Reddit because this is exactly where I picked up the CSS framework. It’s a technique that reminds me of Reddit a bit, as most CSS frameworks feel like presentation driven by developers.

Thanks for grabbing the code and tweaking it a bit. The reason I took it down was because I didn’t fancy having it on my host as it was a demonstration project for work.

As you’ve mentioned it’s nothing that normal (X)HTML cannot handle.

Again, this was a demonstration exercise and my first foray into HTML5. Most of that layout was taken from something I found on one of the work servers and was modified to use a few HTML5 tags to use the framework on HTML5. Any simple validation or a read on the numerous articles on HTML5 would highlight the same stuff you’ve mentioned.

Well, you’ll be glad to know that I came to roughly the same conclusion…

I really wanted to like HTML5, as I’ve always supported some cleaning up of front-end development standards, especially when CSS can be so troublesome.

Sadly, as you’ve rightly declared, HTML5 isn’t even close to being workable, and I’d go as far as to say that so many of the tools released are so inadequate compared to XHTML that there is really no point. I like the idea of some parts, like the canvas, but outside of that things like CSS frameworks just feel backwards.

I was the same way about it – four years ago; and then I tried it… and found out it was like a cherry. All ripe and sweet on the outside, but inside it’s the pits.

The idea of better semantics and new features always sounds appealing – but really 99% of the new tags are unnecessary bloat and break backwards compatibility for no good reason. Section and Article for example are as redundant to DIV as MENU and DIR were to UL during the move from 3.2 to 4. NAV seems to exist for the sole purpose of placating the people who slap div around UL’s and/or header elements for no good reason, header just seems redundant to the existing HEADING tags, (laughable how people get their panties in a wad if you put more than a single concept in a H1, then go and stuff multiple block level containers including headings into LI)… and then you have the completely pointless new media tags.

AUDIO and VIDEO are redundant to OBJECT – there is NO reason that new functionality couldn’t have been applied to that. Canvas on the other hand is useless without javascript, so why the hell does it even exist as a HTML element in the first place. That would be a lot more useful if we could use .js to draw inside ANY element. There’s literally NO reason for CANVAS to exist as a HTML tag…

Which is why my canvas experiment turned out didn’t work with any of the shiv – by creating the element IN javascript the shiv are unable to find it.

CSS frameworks have always been backwards – HTML 5 or no… By their very nature all of them – grid960, blueprint, YUI – rely on presentational classes. The same idiocy as OOCSS. Presentational classes defeat the POINT of using CSS in the first place, as you’re just placing your SCREEN properties into the markup – therein no separation of presentation from content. As I say far, far too often – CSS frameworks are so silly you might as well go back to writing presentational HTML 3.2.

width=“30%” align=“center” bgcolor=“#FF0000
vs.
class=“center red width30”

NO difference, and as such ZERO improvement as that’s still placings thing in the HTML that have no business being there. It boils down to saying in the HTML what things should look like – and that’s not what HTML is for. In fact, it’s no different than if you used a WYSIWYG – and that’s the true laugh of it… coders who wouldn’t consider using a WYSIWYG in a million years vomiting up framework based pages with markup that’s just as bad if not worse.

So that part isn’t HTML5’s fault at all – that’s just CSS framework idiocy in action… something to be filed alongside a clearfix class, clearing div, and presentational markup.

Though in both cases, a lot of it stems from people thinking design ONLY for screen users at the same resolution and dot-pitch they run… forgetting completely that with the plethora of resolutions, font sizes, font renderers, and even non-screen targets putting your “perfect match” screen styling in the markup neuters the ability to target all those other devices.

But as I’ve said before, with HTML 5 setting coding practices back a decade and undoing all the progress of strict, it’s hardly surprising to see fat bloated frameworks being amongst the first nonsense to see deployment with it – and amount to little more than sleazy shortcuts that usually end up costing more in terms of labor and headaches in the long run than just getting off ones tuchas and doing it right in the first place.

Though the really sad part of it is, if they had made 99% of these new features be attributes on existing tags instead of new tags, there would be NO need for shiv’s or any of the rest of the idiotic hoops people are jumping through to try and deploy something before it’s actually ready. Instead of cherry picking the best aspects of each specification, they just slapped them all together willy nilly, flush the idea of validation, and then shoehorn a bunch of extra pointless bloat on top. GREAT plan, I’ve seen this plan before… It was called HTML 3.

It’ll be real fun when 6 comes out, re-introducing the concepts of transitional and strict, with strict deprecating 80-90% of HTML 5.

ULTIMATE, I feel the same way. However, lately there has been a push for HTML5 where I work. Though that is easily accomplished by writing HTML4 and swapping the doctype for the marketing and sales people. I agree though there are some useful things but most of them are more JavaScript related such as; local storage and geolocation. For the most part all the extra HTML elements merely get in the way. None the less, its good to experiment as you were obviously doing.

Since it’s a fact that browsers don’t give a rat’s what doctype you use (if comparing a Strict doctype to the <!doctype html>), and since the validator can be told to test your page under any other doctype (what I do with my HTML4.01 Strict pages… test as XHTML1.0 to catch any mistakes in my “style”), there is no good reason anymore to use the older doctypes. The doctype is for the validator, and the validator can be told to test differently, so… why not?
Remember that Far Side cartoon where the guy yells at his dog Ginger and explains she can’t get into the trash anymore bad dog? All Ginger hears is “blah blah Ginger blah blah bad dog Ginger blah blah”.
Browsers are the same way.

<!doctype html blah blah blah blah… wait, there’s more stuff here, so I’ll check for certain words in here just to make sure I do my doctype switching trick right… blah blah>
<html xmlblah blah I don’t understand namespaces anyway… lang=“somelang”>
<head>
<meta blah blah content-type is text/html but I’m going to ignore that cause I was going to parse this as html anyway cause the server didn’t say otherwise and it ends with .html and charset=utf-8" so I go back to the beginning of the document and start rendering all over again cause the server didn’t tell me otherwise, not that I always bother checking server headers anyway… it depends on the weather you know…>
<meta name=“description” blah blah>
<link rel=“stylesheet” typeblahblah cause I know it’s gotta be CSS or I don’t get it anyway href=“sometyle.css” media=“screen, projection” titleblahblah>
<script type blah blah ignore src=“library.js”></script>
</head>
<body>
stuff…
</body>
</html>

HTML5 is as much a retro-spec as a bring-new-stuff-in spec. Browsers ignore lots of stuff and that won’t change, so why bother typing it out (other than a vague feeling that your code looks and feels more jawsome). Browsers understand <embed>, so they documented it. The freaks who have been using <embed> all along aren’t going to quit now, so why fight that fight? Browsers understand XMLHttpRequest, so they documented it. Those who’ve been using it all along aren’t going to stop, so it’s in the spec.
The spec isn’t as proscriptive as much as it’s descriptive. “Ain’t” is in the dictionary for that reason, not because “ain’t” is correct Engrish, but because there needs to be documentation of its use and a description of how it’s used.

as many people on Reddit, as well as large companies like Microsoft and Intel are starting to move their designs towards being more responsive

They want to add more Javascript without having to actually write it themselves… someone made something called jQuery for that. Pre-written Javascript in a pretty sugary syntax that people can plug and play without needing to know a lick of code. And an added benefit for whose who know a lick of code and have already done the trial-by-fire of writing around basic browser bugs (addEventListener vs attachEvent, this!) and welcome their new jQuery overlords with open arms.

Though where some of the newer stuff like File API come together with XMLHttpRequest version 2 (!) and new attributes like multiple on inputs does allow one to make interesting new user experiences with forms with a lot less Javascript than one would have used with HTML4/XHTML1+Javascript. Guess it depends on what you’re doing and how easily it falls back to basic stuff that every user agent should already understand whether there are scripts or not, HTML5 support or not, new DOM stuff or not.

… and in the process made a page that should only take 9k and make it take 146k on EVERY browser.

This is something I need to look into more regarding Modernizr… it looks like it’ll add a class or two for every feature you’re testing for… with yepnope it then feeds either a yep script or a nope script (though you can leave either empty) based on that support… which looks to me to me a lot of Javascript and a lot of CSS. I get uneasy when I see 50 classes on the body tag on every page.

The CSS and Javascript frameworks… seem a lot like templates. Templates are overly large and bloated, but they are that way for a reason: people who either don’t want to write code, or can’t write code, need something automatic (and flexible). So I’d say if you’re a developer you stay away from these things because your job is to write code, and if you’re anything else you stick to these things because they are safe and fairly stable, and generally backwards compatible (but only if the UA supports scripting and the bandwidth is large enough).

Simply put, a lot of CSS frameworks state that if you plug them in you’ll write next to no code and your site will work in all legacy browsers and will degrade for different devices.

You always have to add to the end of those statements “for when you don’t know how to do it yourself”. Consider a box that’s like the babelfish, and translates what you say into Chinese. This is great if you don’t speak Chinese and need to. This is something to stay away from if you are
-learning Chinese yourself
-can already speak Chinese
because the magical box, designed and built by the most brilliant of minds and the best Chinese speakers, are limited by technology and size and speed and your own Chinese speaking will be either the same level (but you are in total control) or it will be much, much better. Depending on what the box offers I guess.

Sadly, as you’ve rightly declared, HTML5 isn’t even close to being workable,

I disagree. HTML5 isn’t one big thing. It’s a bunch of small things with different labels. Some of it is quite nice and degrades excellently. Some of it is good ideas that mean nothing today because there isn’t good enough browser support (roles roles roles… roles rule and will rule more when browsers fully support them). The multiple h1 thing will probably be a Good Thing with regards to syndication when people swap articles across domains… the idea is the header levels will still make sense no matter what page the article is plopped in, because the nesting level will determine the header level. However since current browsers don’t do this enough yet, current accessibility technology cannot use it, and so today using multiple h1’s is a terrible, terrible idea. But the bright future of structure determining header level to machines (this is an idea from XHTML2.0, the ill-fated tag called <h>) is ultimately, a good thing: unless your page is static and you have 100% control over it, letting bits of your markup and content be spread among other markup and content around the web means making sure the markup structure can be corrected automatically in a way machines understand. In this case, machines understanding is necessary for human understanding.

I’m glad you mentioned Reddit because this is exactly where I picked up the CSS framework.

Reddit is where people think making text with the canvas element is a great idea.

But that first link of his has been bandied around with a bunch of others… “Let’s build a GUI in <canvas>!” is getting more and more popular, while on teh W3C mailing lists they argue about what should be done about that.

Basically, a lot of people get together and exclaim something is really cool without checking it out more deeply.

width=“30%” align=“center” bgcolor=“#FF0000
vs.
class=“center red width30”

Yup.

The idea of better semantics and new features always sounds appealing – but really 99% of the new tags are unnecessary bloat and break backwards compatibility for no good reason.
Section and Article for example are as redundant to DIV

Div didn’t mean anything at all. Article is supposed to mean “stand-alone article” though I’m sad that some of these ideas seem to only think of blogs and newspapers… I don’t see a <houselisting> tag… but these new tags came about from some research Opera did… they looked at the classes and id’s most commonly found on the web that looked like they were describing structure. The top ones they found are mostly what they’ve added as tags to HTML5 (not sure why “post” didn’t show up then, with all the Wordpress out there).
Section seems a lot more washy to me… only thing I can think of is, wrapping a div around random tags doesn’t mean a thing (might mean, I want to use CSS to add a border around it or colour it yellow) whereas <section> does denote that the stuff here “belongs together in some kind of structure or content-based group and there’s no better tag to describe this”.
Ah. Section is the new div. Except it has a bit of meaning.

NAV seems to exist for the sole purpose of placating the people who slap div around UL’s and/or header elements for no good reason,

Nav is an excuse to add a native role of “navigation” to things people are using as… navigation. UL only means “unordered list” which could be navigation, or it could be… anything else. A recipe. A list of products. Things you did while on the toilet this morning. UL != nav; instead
<nav> = <nl> from XHTML2.0
however when people are using <nav> to replace the stupid bloat-tag div they have around their navigational uls, I am indeed a bit disappointed, and still prefer
<ul role=“navigation”>
to
<nav>
<ul>…
but the point is, with more narrowed-down meanings of the newer tags, they can have more specific default roles. Divs have no real roles. They are “some dev wanted to group this stuff for some non-semantic and non-content reason (styling, scripting, for the lawlz)”.

header just seems redundant to the existing HEADING tags,

Unfortunately people will be using <header> just to do the job of wrapping around an <h1>, but the point of it isn’t to wrap senselessly around single header tags, but to group all the content that would otherwise be <div id=“header”> (meaning, more than one tag in there that contains content that is, when put all-together, the heading of that document… or article, or whatever).

and then you have the completely pointless new media tags.

AUDIO and VIDEO are redundant to OBJECT – there is NO reason that new functionality couldn’t have been applied to that.

The point wasn’t so much new functionality… it’s that object doesn’t say what something is. Which they wanted to do. Just as <div> tells the UA little, <object> tells it very little as well… which in the beginning, the creation of <object>, that was the point. This was back when the proponents of XHTML wanted to remove <img> tag and have <object> have pretty much zero meaning… it only says “some other file embedded in this page” and nothing more. Could get ridiculous and stretch that to anchors.

Canvas on the other hand is useless without javascript, so why the hell does it even exist as a HTML element in the first place. That would be a lot more useful if we could use .js to draw inside ANY element. There’s literally NO reason for CANVAS to exist as a HTML tag…

I haven’t figured out the point of canvas either, but I need to read up more on it.

If anyone working on HTML5 could jump in and explain why there’s a special tag for drawing on, rather than just updating the basic DOM API to allow drawing on anything anyway… I’d love to know.

It’s pretty much it’s a bitmap canvas. If everything else was bitmap as well, it would dramatically slow down the rendering of the page.

The bitmap/vector graphics conflict and how it affects the CSS presentation of the page seems to be the central conflict. It might be possible to create a web browser that uses raster graphics for everything, but like the idea of using voxels for 3D graphics, making a web browser where everything is a canvas-like object (bitmap instead of vector) as a competitive entity in the market-place is likely to be a tall order.

Oh, you’re talking about immediate-mode vs retained mode? Ah. So they made a new tag so in the DOM they could give it different events etc?

I hope Doug’s plan comes to fruition soon in some way. Bringing Canvas and SVG together under a single API.

  1. so that as you add and remove content from the page(s) later on you can test for simple errors like that when/if problems crop up later?

For a while I was doing the “write in strict, deploy in transitional” thing, But it was biting me in the ass. Since HTML 5 makes transitional look like a nun latex with a metal yardstick, it is only going to make sites harder to maintain deploying with it.

  1. Which is why if you’re going to write in a certain doctype, what legitimate reason is there to deploy in something else?

For the same reason we say don’t use FONT and CENTER? Yes, they still work, doesn’t mean you should be using them.

Which is funny since it’s still javascript that has it’s own giant slew of stuff to learn – which is a hefty part of what I don’t get. It’s a big needlessly cryptic library that in the end results in more code – at which point where’s the savings or ease of use?!?

… and that right there is what I mean… WHAT sugary syntax?!? The average jquery script is WORSE than what you see at a C Obfuscation contest!!! (but then I say the same thing about Ruby – how the devil is that needlessly cryptic mess “easier”?!?)

More code using more random characters instead of words – and that’s EASIER?!? Must be the “wall of text” illiterate script kiddies in action or something.

More like people who have no ********* business writing websites in the first place sleazing out garbage any old way, and then wondering why the majority of websites tank in under a year or are more of an expense than a means of profit.

If looking JUST at the markup, it’s a steaming pile of bloated garbage I cannot fathom how ANYONE is DUMB ENOUGH to try and deploy or would even WANT to deploy. I suspect this is why they ended up slapping all the other crap that has NOTHING to do with markup under it’s banner – that way they actually have something they can pimp since if you’re just talking the HTML side, I see NOTHING of value apart from perhaps one or two of the form elements.

Which is dangerous because nobody seems to be able to define that meaning clearly, so it’s just going to get abused the way people abuse P now.

One of the things that always bothered me about ‘nav’ – even when used as a CLASS or ID on a DIV or UL, is that EVERY LINK on a page is “navigation” – you’re quite correct as ‘role’ on a UL would make a hell of a lot more sense; though to be frank ARIA roles also feel like a massive waste of markup as well. At some point you have to let the content speak for itself or eventually we’ll all end up wrapping every single word in it’s own tag… or worse, wrapping tags like “nav” around elements that frankly… aren’t navigation. I’m already starting to see that bull out in the world.

Yeah, and I wasn’t exactly a fan of 2.0 either since it too was a bloated train wreck we are better off having been stillborn!

Which is a construct I’ve never used in a page as it’s generally not a neccessary element – in fact it’s something I generally take people to task for doing.

I don’t see that getting ridiculous at all and I was actually looking forward to IMG’s demise – as it meant at some point we might actually have been able to start deploying jpeg2k… and as new and better formats and compressions come along it would be a simple matter to add/remove them to all browsers. “some other file embedded in the page” is a GREAT meaning and a hell of a lot more versatile; and would be less for people to have to learn to use. But no, let’s not ride microsoft’s ass about implementing it all wrong – instead let’s maintain three or four different ways of doing it… RIGHT. Bloody brilliant.

AUDIO and VIDEO seem to exist just to stroke the ego of each browser makers pet codec, and to make our lives more difficult by making us all deploy four or five different encodings of every blasted file.

Oh the point is very simple – it’s the same reason they bunched all the other unrelated technologies under the HTML5 banner – so they can make their new shiny markup look like it has ANYTHING to do with the real innovations, which of course it does not.

Which again like the claim about adding all the new scripting hooks to object being “too hard” why does every element have to have it on there – until it’s NEEDED? Is it that hard to attach a new element atop/over an existing one, and not have it there when not in use?

Literally as I said about a year ago when arguing about the VIDEO and AUDIO idiocy being redundant to Object, is one SWITCH/CASE really so hard to add that they have to write entire separate handlers to do the same job?!? If that’s not BS I don’t know what is. Since it’s scripting only, why not just have “element.addCanvasContext()” attach it when you want or need it? Then it’s not there when it isn’t in use!

No, that would be too simple and make too much sense.

When roles were added to XHTML2, the point was for them to be added by authors when the markup couldn’t speak for itself (when context and behaviour rather than semantics determined the meaning… like when trying to use markup to build widgets).

In HTML5 they are slowly adding “default” roles (<button> has the role of … button, for example) which are nothing more than a way for the browser to pass a somewhat stiffer/firmer set of meta-data to its accessibility layer for AT to use… users and authors don’t directly come in contact with these roles.
But then you as author can override (or augment, since you’re not allowed to use a completely conflicting role on something) the default roles when you need to take a bit of markup and make it mean something else.

Also, landmarks. Landmarks rock, but right now some ATs get confused. I’m assuming the point will be, wherever an author manually adds any of the landmark roles, those will be announced for navigation whereas the default roles will not.

Since <nav> has a role of navigation, if I also want it to be a landmark (main page navigation) then supposedly I’m supposed to be able to do
<nav role=“navigation”>
so that if I have other things wrapped in <nav>s but there happen to be a lot of them (and let’s say I’m not wrapping tertiary navigation, pagination or that kind of junk in <nav>s), I should get a bunch of things that tell the AT “these are site/product/page navigation” but just one of them as an actual landmark (where users can skip to it based on what it is in lieu of actual skip links).

Landmarks can’t replace skip links for me, since they’re only available to screen reader users (so many others need skip links), but they are somewhat more awesome than skip links so I like having both.

Anyway, I’ll stick to HTML4+ARIA roles since nothing else has default roles to fight with my hand-authored roles, since in HTML5 those things are now in flux and do little but confuse today.

Re doctypes:

What’s it matter? I always use the online validator(s) and I always tell them which rules to judge my markup by.

The doctype isn’t for me, it isn’t for the browser, it’s for the validator, so if I can just tell the validator which rules I want to be judged by, then I’m effectively doing the same thing.

Which is why if you’re going to write in a certain doctype, what legitimate reason is there to deploy in something else?

Laziness. Which Larry Wall considers a virtue :slight_smile:
If my browsers are gonna laze out on me and do
<!doctype html blah blah blah yakkitty schmakkitty> amyway
then I don’t see the point in getting the long one to copy-pasta from if I can write the short out out from memory.

For the same reason we say don’t use FONT and CENTER? Yes, they still work, doesn’t mean you should be using them.

The only folks not using <font> and <center> are those of us who gave a rat’s in the first place. Those who do use those tags will not stop. So, I don’t see it as a huge deal. They could have added <embed> and then set it to “obsolete” (like they did with font and center being deprecated… they’re in the specs because the specs document what/how browsers parse, and they do parse those fine, but they’re also listed as obsolete and deprecated. Dunno why not with embed (they could have called it non-conforming, but I guess they can’t call it deprecated since it was never in the specs to begin with)).

Which is funny since it’s still javascript that has it’s own giant slew of stuff to learn – which is a hefty part of what I don’t get. It’s a big needlessly cryptic library that in the end results in more code – at which point where’s the savings or ease of use?!?

I dunno, I just hear everyone going on and on about how “easy” jQuery is. I think it’s partially because it hides lots of loops from programmers.

… and that right there is what I mean… WHAT sugary syntax?!?

For one thing, prolly the CSS-selector setup they have. Though, I found out, the newest ECMA script (5) has that stuff too now:
document.getElementsByClassName() is in!
document.querySelector(‘div > p > a’) is in!
document.querySelectorAll(‘table tr:nth-child(odd)’) !

el.contains(‘someclass’)

they also just added to the spec .innerHTML, .outerHTML and .insertAdjacentHTML (never even heard of those last two).

Since IE9 does addEventListener, I can see a lot of the basic bull all JS libraries were supposed to “take care of for us” becoming less and less useful.

Re section:

Which is dangerous because nobody seems to be able to define that meaning clearly, so it’s just going to get abused the way people abuse P now.

Yeah I just read an HTML5doctor page about “abuse of <section>” and it didn’t make things hugely clearer for me either. But basically he said “if you’re grouping stuff for scripts or styling, just use a div”.

I can see some soup coming our way here though.

Which is indeed the correct approach – As I’ve said a billion times semantic markup isn’t just about slapping P around anything that happens to be CDATA; in the same way slapping tags with a semantic meaning around the wrong things is just as bad as not saying it at all. If something already has a meaning, adding MORE meaning to it is probably wrong.

See much of my problem with “header” which I’ve been seeing a lot of:


<header>
  <h1>Title</h1>
  <nav>
    <ul id="mainMenu">
      <li><a href="#">Home</a></li>
    </ul>
  </nav>
</header>

H1 is a heading, the start of a section, so why do we need to say it’s in a header… the first list on the page is filled with nothing but anchors, so it’s obviously “navigation” what do we need the extra element for, and why is it in “header” – neither header or nav add ANY meaningful semantics the other semantic markup and content of that markup isn’t already communicating… as such that’s two extra elements on the dom for NOTHING. I’m much more open to putting “role” on the UL and saying “perfect” than this nonsense of extra wrapping tags for no good reason… either that or bring back MENU – which they have, but for some weird thing to do with FORMS instead of what it used to be for. (Honestly, I can’t make any sense out of what MENU is doing back or what it’s supposed to do in the new spec)

See my opinion of <div id=“header”> which is 99% of the time also a wasted element, but at least it isn’t stacking extra meaning onto tags that already have meanings. (herpaderp!)

In many ways the pendulum has swung too far the other direction – It’s like HTML 3.2, just in the opposite way. 3.2 was bloated for slapping presentation in the markup – now we have 5 which is bloated for going too far the other direction, and being obsessed with slapping extra tags with meaning around everything above and beyond what’s actually necessary. Same bloat, different reason.

… and again forgetting all the improvements STRICT gave us. As I keep saying, when people can’t be bothered to use the tags we already have properly, with many ‘professionals’ out there blissfully unaware of dozens of tags they should be using (TH, THEAD, TBODY, LEGEND, LABEL, FIELDSET, CAPTION, DEL) slapping more tags into the specification is NOT the answer!

(Honestly, I can’t make any sense out of what MENU is doing back or what it’s supposed to do in the new spec)

This is my guess:
since one of the reasons HTML5 came into existence was to make HTML work as “Web Applications 1.0”, they wanted something specific for dropdown menus (instead of ul li, though that contruct may not have existed back then?) in applications (like what you see on Desktops). So they wanted a specific tag for that where they could probably hook other things like AT and scripting into… and maybe chose <menu> because it was deprecated (so people were not using it for something else) but still recognised by browsers (like most deprecated things) so it was easier to just tell browsers a new meaning rather than adding a whole new tag.

I haven’t read enough of the mailing lists to see when/why decisions were to make whole new tags, only add new attributes or types (I think form inputs just lucked out that they have “type” attributes so they didn’t need to add whole new tags to get some XForm-style goodness), or just add new roles to existing elements (since they did indeed change the meanings of some tags like small and strong).