Live data from Hacker News

The ﹤main﹥ element

html5doctor.com

21–30 of 93 posts

Re: The ﹤main﹥ element

#21
I'm still waiting for some sort of or element to markup comments and other such tripe. E.g.:

  Buy my pills!
It would be even more useful if something like this works:

  Buy pills
    here!
  
This is cleaner than putting the attribute on every anchor, I wouldn't mind crawlers skipping marked comment sections entirely either.

Re: The ﹤main﹥ element

#22
post #19

I still haven't found one good reason to use any of the semantic HTML5 tags instead of just good old divs. This didn't convince me.

… header {…}

is slightly shorter than

… .header {…}

Re: The ﹤main﹥ element

#23
post #4

Has anyone used all of the HTML5 tags in anger? I've tried a couple of times to build something fully "semantic". I struggle to create something that looks good semantically (ie just reading the HTML) and is also laid out on the page in the way I wanted it to be. There seem to be lots of situations, even in just mildly complicated web pages, where you need to write HTML code solely for graphics / layout reasons that…

I think that CSS is the biggest failure here. Let's say I have a blog, so for article page markup should be something like this: lorem ipsum search 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: search I either have to do some hacky position:absolute things, crazy floats with negative e…

Excuse my ignorance, but can you not use div layers to position your data as well as the header / footer tags?

Re: The ﹤main﹥ element

#24

I'm still waiting for some sort of or element to markup comments and other such tripe. E.g.: Buy my pills! It would be even more useful if something like this works: Buy pills here! This is cleaner than putting the attribute on every anchor, I wouldn't mind crawlers skipping marked comment sections entirely either.

Would be useful to also sandbox it against running any javascript etc. contained therein.

Re: The ﹤main﹥ element

#25
post #17

Somewhat interesting, perhaps, is the fact that this page itself has the following markup: ... I, too, have tried to use semantic markup. Unfortunately, except for the most straight-forward of layouts, it's very hard to do. Though I guess there was also a time when non-table-based layouts was considered harder than it was worth...

Arguably most modern websites might as well be using tables considering how they use divs.

Re: The ﹤main﹥ element

#26
post #25
post #17

Somewhat interesting, perhaps, is the fact that this page itself has the following markup: ... I, too, have tried to use semantic markup. Unfortunately, except for the most straight-forward of layouts, it's very hard to do. Though I guess there was also a time when non-table-based layouts was considered harder than it was worth...

Arguably most modern websites might as well be using tables considering how they use divs.

yes. this is an under-appreciated fact.

Re: The ﹤main﹥ element

#27
post #4

Has anyone used all of the HTML5 tags in anger? I've tried a couple of times to build something fully "semantic". I struggle to create something that looks good semantically (ie just reading the HTML) and is also laid out on the page in the way I wanted it to be. There seem to be lots of situations, even in just mildly complicated web pages, where you need to write HTML code solely for graphics / layout reasons that…

  > There seem to be lots of situations, even in just mildly
  > complicated web pages, where you need to write HTML code 
  > solely for graphics / layout reasons
It depends on the browsers support desired, but for reasonably modern browsers this should be rarely the case, except for really complex layout. Now when we have multiple backgrounds and background images and generated content there is less demand for extra elements.

Re: The ﹤main﹥ element

#28
post #13

Earlier quoted context omitted.

I think that CSS is the biggest failure here. Let's say I have a blog, so for article page markup should be something like this: lorem ipsum search 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: search I either have to do some hacky position:absolute things, crazy floats with negative e…

Flexbox[1] addresses the issue you're talking about - of course, browser support is still a little lacking (No support for IE9 or below, and IE10 doesn't conform to the current spec). [1]: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexi...

In other words, it's useless for now, and for a few more years.

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.

Re: The ﹤main﹥ element

#29
post #23

Earlier quoted context omitted.

I think that CSS is the biggest failure here. Let's say I have a blog, so for article page markup should be something like this: lorem ipsum search 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: search I either have to do some hacky position:absolute things, crazy floats with negative e…

Excuse my ignorance, but can you not use div layers to position your data as well as the header / footer tags?

You can, and that is how it's mostly done now.

But that isn't semantically correct. A div tag is just a div tag - like all other div tags.

An article tag is "a div tag", unlike all other div tags. It tells that this is the main part of the webpage.

Re: The ﹤main﹥ element

#30
post #23

Earlier quoted context omitted.

I think that CSS is the biggest failure here. Let's say I have a blog, so for article page markup should be something like this: lorem ipsum search 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: search I either have to do some hacky position:absolute things, crazy floats with negative e…

Excuse my ignorance, but can you not use div layers to position your data as well as the header / footer tags?

Depends on the meaning of "can" and "div layers". Technically speaking I can do many things, it's just that CSS (before flexbox, as mentioned in the comments) does not have any nice way to say that this element should be displayed before that element and so on.

Not sure what you ment with the layer thing.

Post reply on HN