homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

XHTML & Structured Data

 3:15 am on Apr 2, 2014 (gmt 0)

My website uses XHTML STRICT and I want to implement structured data for google search engine. Can I implement it? When I implement structured data way too many validation errors occurs. Please suggest what should I do.



 4:12 am on Apr 2, 2014 (gmt 0)

Try RDFa instead of microdata - Google parses it fine.

Also try switching to XHTML5 and write itemscope as itemscope="itemscope". You may have to use a custom DTD to make it validate.... not up to date on that.


 5:15 am on Apr 2, 2014 (gmt 0)

what should I use as doctypefor XHTML5?


 10:43 am on Apr 2, 2014 (gmt 0)

1. Use HTML (you're almost certainly already using HTML, but with an XHTML1 doctype)
2. Use "<!DOCTYPE html>" as the doctype
3. validate using the new (X)HTML5-based validator at [validator.w3.org...]


 11:36 am on Apr 2, 2014 (gmt 0)

What @mattur said. I'd bet money you're not really serving XHTML.


 11:45 am on Apr 2, 2014 (gmt 0)

I have a phpbb Based forum and using default prosilver theme which is written in XHTML strict.


 6:01 pm on Apr 2, 2014 (gmt 0)

The doctype you use doesn't determine whether a page is XHTML or HTML, the media type you send your pages with does. So unless you've specifically configured your server to send your pages as application/xhtml+xml, you're using HTML pages with an XHTML doctype.

The doctype does affect the rules the validator uses to check the conformance of your pages. Simplest thing to do is just change your doctype to <!DOCTYPE html>. It won't affect the way browsers process your pages, but will allow you to easily validate more modern language features like microdata and rdfa. HTH.


 11:58 am on Apr 10, 2014 (gmt 0)

I have changed doctype to html5 but still not getting the correct breadcrumbs. I have implemented them like that.

<ul class="linklist navlinks">
<li class="icon-home"><div xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="{U_INDEX}" accesskey="h" rel="v:url" property="v:title">{L_INDEX}</a></span> <!-- BEGIN navlinks --><!-- IF not navlinks.S_FIRST_ROW --> <strong>&#8249;</strong> <span typeof="v:Breadcrumb"><a href="{navlinks.U_VIEW_FORUM}" rel="v:url" property="v:title">{navlinks.FORUM_NAME}</a></span><!-- ENDIF --><!-- END navlinks --></div></li>


 4:31 pm on Apr 10, 2014 (gmt 0)

For a start you are using data-vocalulary.org instead of schema.org.

Also, you should RDFaLite not RDFa (sorry, my mistake earlier) but now you are using an HTML5 Doctype microdata should be OK as well.


 4:36 pm on Apr 10, 2014 (gmt 0)

Can you suggest what should code look like.


 5:34 am on Apr 17, 2014 (gmt 0)

Now my code look like this

<ul class="linklist navlinks" vocab="http://schema.org/">
<li class="icon-home"><span typeof="breadcrumb"><a href="{U_INDEX}" accesskey="h" property="url"><span property="title">{L_INDEX}</span></a></span> <!-- BEGIN navlinks --><!-- IF not navlinks.S_FIRST_ROW --> <strong>&#8249;</strong> <span typeof="breadcrumb"><a href="{navlinks.U_VIEW_FORUM}" property="url"><span property="title">{navlinks.FORUM_NAME}</span></a></span><!-- ENDIF --><!-- END navlinks --></li>


Is it right?


 3:49 pm on May 1, 2014 (gmt 0)

is this code right?

<ul class="linklist">
<li class="icon-home" itemscope itemtype="http://schema.org/WebPage"><div itemprop="breadcrumb" itemscope itemtype="http://schema.org/Breadcrumb"><a href="{U_INDEX}" accesskey="h" itemprop="url"><span itemprop="name"><strong>{L_INDEX}</strong></span></a> <!-- BEGIN navlinks --><!-- IF not navlinks.S_FIRST_ROW --> <strong>&#8249;</strong> <span itemprop="child" itemscope itemtype="http://schema.org/Breadcrumb"><a href="{navlinks.U_VIEW_FORUM}" itemprop="url"><span itemprop="name"><strong>{navlinks.FORUM_NAME}</strong></span></a></span><!-- ENDIF --><!-- END navlinks --></div></li>

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved