I am using Sharepoint 2007 (MOSS) and I would like to add color to the text of the titles in the new item page for my custom list.


Date: Description:

These titles are in a particular color from the other headings

  • I need to add color to specific headings

If you're looking to change the color of all the heading, use CSS as suggested by user234429. For particular heading(s) you could use jQuery/javascript something similar to:

    var arr = ["Title *", "Date:", "Description:", "Body"];
    $(".ms-standardheader").each(function () {
        if ($.inArray($(this).text().trim(), arr) >= 0) {
            $(this).css('color', 'red');
  • Where would I add this code?
    – Jemelia
    Feb 5 '14 at 9:46
  • Edit the page in SharePoint designer and add reference to jQuery if you don't have. Then insert the code within ContentPlaceHolderMain. Or if you opt to create a custom New Form, see the video tutorial youtube.com/watch?v=zs5kHAddhzY
    – Aveenav
    Feb 7 '14 at 2:41

If you open your page in IE Developer mode you can see that the titles of fields have a class of ms-standardheader. You could then edit the form page using SharePoint Designer 2007 tag with whatever style you want.

If the ms-standardheader class is to wide reaching, you can use the developer toolbar to look a bit higher up the DOM tree to find the ID of the form web part. An example of your script might look like this.

WebPartWPQ2.ms-standardheader {color:red;}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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