| | |
Heading tags and div tags
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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?
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
•
•
•
•
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?
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...
Always a work in progress...
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:
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:
![]() |
Similar Threads
- Putting two p or div tags horizontally aligned on same plane (HTML and CSS)
- Site working right in every browswer except IE (HTML and CSS)
- Unable to apply style to div tags inside form (HTML and CSS)
- XHTML empty DIV tags (HTML and CSS)
- About DIV tags (HTML and CSS)
- GeSHI not working properly (PHP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Displayed Text in MS Internet Explorer
- Next Thread: Layout in CSS
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






