Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

HTML & DIV in Snippet & Meta Description

         

chriskriag

6:08 am on Apr 10, 2015 (gmt 0)

10+ Year Member



I'm seeing <div> and id in SERP snippets of my website. When I do search site: in google like this..

site:abc.com/faq/

I see <div> .... <Id class=faq> .. and much more in the meta description or snippet of the website..

Please tel me why this is happening?

aakk9999

10:29 am on Apr 10, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is it in the meta description or in the snippet? If you click on the SERP link of this page and then do "View Source", what do you see these in your meta description?

I am asking because if it is in meta description, it is easy to fix as you control it. If it is in a snippet, then you will need a bit more time to figure it out why (invalid HTML?).

lucy24

7:13 pm on Apr 10, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



the meta description or snippet

I realize this sounds like a tired old joke, but you really need to clarify what "or" means here.

In the SERP context, "meta description" is a subset of "snippet"; the meta is used when the search engine can't find a single connected passage on the page that contains all search terms. (Disclaimer: I don't know if there exists an Official Pronouncement. It's just what I found in the course of casual experimenting-- when looking for something else, probably.) The meta description, being a meta, can't possibly contain <div> or any other markup, unless your CMS has gone severely haywire. Which would be a whole different question.

aakk9999

11:39 pm on Apr 12, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sorry if my question was confusing, what I mean is - whether, when looking at View Source, there is a div within meta description.

I know it would be CMS going haywire, but it could also be the user entry error (within CMS that does not validate user input well enough).

For example, entering <div> by mistake into some CMS systems could end up having <div> encoded as &lt;div&gt; (usually happens when the page is saved), which then would show as <div> within the meta description.

Hence my question - is it within meta description or pulled out as a snippet that Google pulled out from elsewhere on the page.

Hoople

2:58 am on Apr 13, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If code that is supposed to be hidden in the normal view begins to show I would look for some invalid HTML as the culprit.

Specifically a missing single quote, double quote or missing/malformed closing tag. A extra single quote or double quote where it shouldn't be in rare cases I've seen do this.

How does it look when you 'Crawl as Googlebot' in Webmaster Tools? Is your page 100% valid HTML/XML?

not2easy

3:08 pm on Apr 13, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



As Hoople suggests, I'd first make sure the page's coding is valid, look at the doctype and make sure that is what the page is supposed to be. Then look for missing closing characters. There are tools to help you with validating your html and css and they will tell you what needs to be fixed.

You can check your html for errors at W3C: [validator.w3.org...] and then check your css at their Jigsaw Validator: [jigsaw.w3.org...]