by hpaavola · 13y ago · 0 comments
<html><head></head><body>
<article>lorem ipsum</article>
<nav></nav>
<form>search</form>
<footer></footer>
</body></html>
That way screen readers, search engines, etc will get the important stuff first and less important stuff afterwards.But since the common way of presenting blog is more like this:
<nav></nav> <form>search</form>
<article></article>
<footer></footer>
I either have to do some hacky position:absolute things, crazy floats with negative everything, or just reorder the markup. Crazy and hacky is not fun to maintain, so I have to reorder the markup. That's because CSS is made for changing fonts and colors, and not for layouts.[1]: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexi...
God, I wish IE 8 wasn't the latest thing on XP (Still a lot of users on windows XP) and that new features weren't added only in major releases that happens rarely for Microsoft.
Rarely, that is, compared to other vendors on the market.
<html>
<head></head>
<body>
<article>
<nav></nav>
<form></form>
<main></main>
<aside></aside>
<footer></footer>
</article>
</body>
</html>
You can additionally include a "skip to content" link up top.And those skip to content -links just the kind of hack we should not have to do. There should not be anyhting before the content, markup-wise.
Also of note, footer can be for the article or the whole page. If you like, you can put footer outside the article and put the site-wide navigation there in addition to any forms.
Skip to content links aren't hacks, but are in fact part of standard procedure for web accessibility and do solve a problem with fewer steps. Try not to look at things that don't necessarily conform to arbitrary standards of elegance as hacks.
And what comes to skip to content -links, those definetly are hacks. What they mean is "Dear user, we would have put the content first in the source, but since CSS is not a layout definition language, it was not possible, take this link instead."
Why do you think this is "hacky"? This is precisely what absolute positioning is for.
Not sure what you ment with the layer thing.
I'm still learning my way through HTML5 (I have had some experience with the markups that proceeded it though), so I just wanted to be clear on the issue :)
re "div layers", that was a foobar on my part. I meant "div tags". Sorry for the confusion.