Semantic Web Design

Semantic Web Design

A buzz word right now on the web is semantic. Semantic coding is a way of helping machines better organize data and understand what the content is about.  Semantic integration is also keeps code clean.  HTML 5 will offer this, which is still a long way off, but HTML 5 will use new tags, such as <nav> which will hold navigation, <header> will hold headings, and <footer> will contain extra information, such as meta data and such. 

 

Semantic integration can be used in standard HTML 4 using class names, which can help with SEO.  So for a navigation section, use <div class="nav">, or for sections of content, use descriptive class names such as "col-1", rather than just left.  This not only helps humans understand code, but search engines too.  You can also nest such class names.  So say if you wanted a sidebar section, you could use:

 

<div class="sidebar-right">

<div class="header"><h1>Example Title</h1></div>

<div class="content">Example content</div>

<div class="footer">Meta data, such as RSS, Twitter link</div>

</div>

 

Another way of describing data is RDF, or Resource Description Framework.  A better way to explain RDF is to show an example, consider the following, say if you wanted to describe to search engines two records from a CD list:

TitleArtistCountryCompanyPriceYear
Empire BurlesqueBob DylanUSAColumbia10.901985
Hide your heartBonnie TylerUKCBS Records9.901988

 

<?xml version="1.0"?>

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">

<rdf:Description
rdf:about="http://www.recshop.fake/cd/Empire Burlesque">
  <cd:artist>Bob Dylan</cd:artist>
  <cd:country>USA</cd:country>
  <cd:company>Columbia</cd:company>
  <cd:price>10.90</cd:price>
  <cd:year>1985</cd:year>
</rdf:Description>

<rdf:Description
rdf:about="http://www.recshop.fake/cd/Hide your heart">
  <cd:artist>Bonnie Tyler</cd:artist>
  <cd:country>UK</cd:country>
  <cd:company>CBS Records</cd:company>
  <cd:price>9.90</cd:price>
  <cd:year>1988</cd:year>
</rdf:Description>
.
.
.
</rdf:RDF>

 

The code above may look alien, but this is how RDF code looks like.

 

Drupal 7 will integrate RDF as standard, which has been hyped as a big push towards semantic web, search engines such as Yahoo's Search Monkey already uses RDF data in search results.  This maybe an advantage SEO-wise, maybe not right now, but certainly in the future.

 

Big Pepper can offer this right now to businesses, a web design company situated in Wakefield, near Leeds.