Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!


Sponsored Content

 

 
 

Photo
- - - - -

<span> Tag


  • Please log in to reply
4 replies to this topic

#1 thloniusmonk

thloniusmonk

    HR 2

  • Members
  • PipPip
  • 16 posts

Posted 02 September 2005 - 07:21 AM

Hi all,

As part of the optimization process for my website we think of taking out all the DIV tags currently present in the code and replacing them with span tags.

Do someone know whether it's optimization wise to replace DIV tags with the SPAN tags without hurting the optimization process ? Do SE's 'prefer' <span> above <div> or maybe it makes no difference?
Do someone have past experience with such a case?

Regards,
Thlonius

#2 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 02 September 2005 - 07:38 AM

There's no difference I've ever seen for SEO purposes.

One thing to remember from the design side of things though is that <div>'s insert what amounts to an implicit <p> that <span>'s don't. That's usually the reason I sometimes choose a span over a div, for those times when I need to apply a CSS class to text in the middle of a sentence.

#3 Jill

Jill

    High Rankings Advisor

  • Admin
  • 32,311 posts

Posted 02 September 2005 - 07:39 AM

The search engines (for the most part) ignore the code on the page, so I wouldn't worry about it. They're mostly interested in the words.

#4 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 5,880 posts
  • Location:Blackpool UK

Posted 02 September 2005 - 09:18 AM

Why?

Every one you replace will add two bytes to the download overhead, plus 8 extra bytes to add a <br> above and below where needed.

#5 Raphael

Raphael

    The Limey Cowboy

  • Active Members
  • PipPipPipPipPipPip
  • 722 posts
  • Location:New England

Posted 02 September 2005 - 11:28 AM

a <div> is a block level element, a <span> is an inline element. They are treated internally differently by browsers and should be used for different things.

Sure, CSS can give a <span> the visual effect of a <div> and vice versa, but that doesn't mean they're identical tags. No two tags in any form of HTML or XHTML are identical.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users