SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're inserting web parts into a publishing page and noticing that SharePoint wraps their title in H3 tags by default. Is there a way to control this? We need it to insert the title as H2, at least in one section of the page? We're tempted to use jQuery to parse the HTML and replace the tags, but wondered if there's any other way. Thanks.

share|improve this question
up vote 3 down vote accepted

If you want to selectively change the styles of title in a particular section/webpart, using jquery selector to locate those web part titles and change the styles is an appropriate option.

If you want to change the styles across all pages, I would suggest overriding the default webpart title style using CSS instead of replacing h3 with h2. You can override

.ms-WPHeader TD H3

I came across a nice article here if it helps.

share|improve this answer
as I understand Alex wants to change the styles in a section of page, not whole the page. – Alexander Dec 4 '11 at 16:40
The first paragraph addresses it. – Ashish Patel Dec 4 '11 at 16:54

If you should change a style only in a part of page you can take a page layout that is used by this page from master page and layouts library, make a copy of this layout. Then open this layout and wrap a part of page that should has your style to the some div and define its class. after this you can override styles on the page like this

.yourDiv .ms-WPHeader TD H3
     font-size: 12px;

Then upload this layout to the library and apply it to your page.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.