User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 391,914 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,729 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 5340 | Replies: 2
Reply
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 107
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Heading tags and div tags

  #1  
Jul 21st, 2004
I would like to use <H1> and <H2> tags to emphasize important keywords for SEO purposes. Is it XHTML-transitional legal to enclose a <div class="blah"> tag inside an <h1> tag?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Location: Ohio
Posts: 13
Reputation: JasonRCS is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
JasonRCS's Avatar
JasonRCS JasonRCS is offline Offline
Newbie Poster

Re: Heading tags and div tags

  #2  
Aug 4th, 2004
Originally Posted by cscgal
I would like to use <H1> and <H2> tags to emphasize important keywords for SEO purposes. Is it XHTML-transitional legal to enclose a <div class="blah"> tag inside an <h1> tag?

I believe it is, but why... You could just apply the class to the <h1> tag: <h1 class="blah"> or assign the style to it in your style sheet:

h1 { some-style:xxx; }

Then all <h1>'s would inherit that style...

Make sense? If you are after another result, please share.... I am curious.
JasonRCS

Always a work in progress...
Reply With Quote  
Join Date: Jul 2004
Location: Wales
Posts: 735
Reputation: DaveSW is on a distinguished road 
Rep Power: 6
Solved Threads: 17
DaveSW's Avatar
DaveSW DaveSW is offline Offline
Master Poster

Re: Heading tags and div tags

  #3  
Aug 7th, 2004
I'd prefer to use a span as it's inline. If you put a div in a h1 and put it into the wdg validator - http://www.htmlhelp.com/tools/validator/direct.html it fails, though for a reason I don't actually agree with. (h1 isn't inline to the best of my knowledge).

However the only reason I've used this sort of thing for is avoiding box model problems by putting width on one and margins one the other. Is there another use? :curious:
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 8:03 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC