• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.0 Semantic HTML

welshstew

Active member
#82

Mike

XenForo developer
Staff member
#83
If you disable JS, it breaks. And this was IE6, but I did run into a situation where the shiv concept failed on dynamically included content.
 

simbolo

Well-known member
#84
Absolutely right - although you will find that XenForo uses conventions such as
HTML:
<header>
    <div id="header">
    ...
    </div>
</header>
as a certain ghastly browser is still unable to apply styling to HTML5-specific tags, even in version 8 :(
I noticed you're using the <nav> tag twice. Once within the header and once within breadcrumbs. Since one of semantic markup's goals is for seo purposes and, as has been pointed out, some believe that google may penalize for duplicate content within a page. Is this an attempt at preventing google from seeing duplicate content and if so do you have anything to support this notion? Or is it simply following proper markup according to W3C and hoping that Google/Bing/etc use it correctly? (I've employed it the same way, but just curious on your thoughts.)
 

Forsaken

Well-known member
#85
I noticed you're using the <nav> tag twice. Once within the header and once within breadcrumbs. Since one of semantic markup's goals is for seo purposes and, as has been pointed out, some believe that google may penalize for duplicate content within a page. Is this an attempt at preventing google from seeing duplicate content and if so do you have anything to support this notion? Or is it simply following proper markup according to W3C and hoping that Google/Bing/etc use it correctly? (I've employed it the same way, but just curious on your thoughts.)
<header>, <nav>, <section>, <article>, <aside> are meant to be re-used.

HTML5 For Web Designers said:
nav
The nav element does exactly what you think it does. It contains
navigation information, usually a list of links.

Actually, I’d better clarify that. The nav element is intended for
major navigation information. Just because a group of links
are grouped together in a list isn’t enough reason to use the
nav element. Site-wide navigation, on the other hand, almost
certainly belongs in a nav element.

Quite often, a nav element will appear within a header element.
That makes sense when you consider that the header
element can be used for “navigational aids.”
From the ebook HTML5 for Web Designers.
 

simbolo

Well-known member
#86
This I know, as I noted with the W3C mention. I suppose my real question is if there was any knowledge that search engines already pick up on this as a way to segregate out duplicate content that should be ignored preventing a potential penalty?
 
F

Floris

Guest
#87
Google has expressed themselves about this already that a page can simply have multiple navigation elements, and they do not punish for this (SEO wise). It's another one of those SEO-myths.
 

Forsaken

Well-known member
#88
Really, there are few things that will get you penalized out of blackhat seo methods, and thats just asking to be penalized.

Google has been involved with the HTML5 implementation with the W3C and WhatWG for a while (Either as a company, or through many of their employee's).
 

Anthony Parsons

Well-known member
#89
Absolutely right - although you will find that XenForo uses conventions such as
HTML:
<header>
    <div id="header">
    ...
    </div>
</header>
Yer... that's not your fault though. Whilst I would love to think things will change rapidly once IE9 is released, I know it won't due to the backwards compatibility issues with IE8 < that people will hang onto for another decade, just like every designers best friend, IE6.

I really don't like Microsoft some days. The next decade will be just as annoying as the last due to IE6, with the change to HTML5. It will be difficult to fully implement HTML5 due to backwards compatibility issues, let alone the nightmare with CSS3 and the joys it opens up to us, yet will also remain totally useless due to the above IE issues. Kind off frustrating...
 
#92
I had a question on this. It would be nice if paragraphs had the <p> around them, which would let me use padding before/after in my stylesheet. That looks really nice typographically. Also, I think it's in HTML 5. Currently, <p> is not used. I presume that's a decision, not oversight, so am curious to see if it could be reviewed so that paragraph spacing could be implemented.
Here is a post's current HTML in xenforo:
Code:
<article><blockquote class="messageText ugc baseHtml">I'll be using xenforo posts as <i>content</i>, with articles written inside them (context: we're going to use xenforo for the new site instead of WordPress). It will be very helpful to keep revisions of posts so I can revert to an earlier version if necessary.<br />
</blockquote></article>
 

karrott

Active member
#93
You could just use some simple css to change the top and bottom padding of HTML 5 tags. You can actually simulate paragraph tags quite easily.

I still don't know why they used <blockquote> though. :p
 

Kier

XenForo Developer
Staff member
#96
You could just use some simple css to change the top and bottom padding of HTML 5 tags. You can actually simulate paragraph tags quite easily.

I still don't know why they used <blockquote> though. :p
Blockquote is the closest semantic tag to what we want that will allow styling under Internet Explorer. It's meaning us interpreted well by that w3c test.
 

karrott

Active member
#97
Blockquote is the closest semantic tag to what we want that will allow styling under Internet Explorer. It's meaning us interpreted well by that w3c test.
I see; that makes sense. I'm glad that you guys are still developing with IE in mind.
 

DRE

Well-known member
#99
will custom skins have an effect on this?
That depends what you edit of course. If you only change CSS, it will have no effect at all. If you edit the HTML you would need to be careful to maintain the presence of specific tags in order to retain the semantic meaning of the page.
*is glad I don't touch the templates when creating styles after reading this*