Welcome to WebmasterWorld Guest from 54.210.61.41

Forum Moderators: buckworks

Message Too Old, No Replies

How can I check my site's semantic coding?

     
7:31 pm on Jul 31, 2015 (gmt 0)

Full Member

5+ Year Member Top Contributors Of The Month

joined:May 11, 2012
posts: 320
votes: 3


I been reading up about semantic coding with html, including <article>, <nav>, etc. My Magento shopping cart doesn't use html but was built using peer elements, I believe. Still, are there any tools online that will go through my site and try to see if it understands my coding and can make sense of it.

For instance, my source code says <div class="main container"> which I believe is the same as <main> but I would like to know that my site is properly structured and each part of it is formatted the right way to signify the navigation area, the header area, etc.

Looking for some suggestions.
12:24 pm on Aug 1, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 10, 2001
posts:1551
votes: 10


What's the consequence of using
<main>
instead of
<div class="main container">
?
For now, the primary consequence is that it's shorter to write and easier to read for you when editing your HTML and CSS.

Years into the future, there may actually be tools out there (eg. search engine spiders) that will use such coding to determine where the content of your page is stored, as opposed to navigation, ads, etc.
Or did I miss any relevant tools already doing that out there?

And of course that also only applies to tag names defined in some public standard. Once you start defining your own tags, only you and your own tools will be able to make "semantic" sense of them.
6:03 pm on Aug 1, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15443
votes: 738


my source code says <div class="main container"> which I believe is the same as <main>

Mmnn, not really. <div> is an element and <main> is an element, while .main and .container are style classes.

It may, coincidentally, happen that the styling your CSS has defined for the two classes ".main" and ".container" --with an outside option on ".main.container" in combination --is the same as the styling your browser applies, on its own initiative, to the element "main". But that doesn't make them "the same" in any meaningful way.

By itself the <div> element doesn't mean anything. It's just a matrix or armature that you can attach block-level styles to.

If you are using a major CMS-- you said Magento, right? --you can be certain the search engines already know the names of its more common style classes, and therefore "know" what a page looks like even before consulting the CSS.
2:55 pm on Aug 4, 2015 (gmt 0)

Full Member

5+ Year Member Top Contributors Of The Month

joined:May 11, 2012
posts: 320
votes: 3


I do use Magento, but still have concerns that my coding may not be functioning correctly. To be certain, I wanted to test things and was wondering if there was a way to do so?
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members