Recently a friend asked me how to add HTML content into Content Editor WebPart since they were unable to find this option in SharePoint Server 2010 as they were used to MOSS 2007.

 If you add a content editor webpart in a page and then if you try to edit it you will find this



Unlike MOSS 2007 you will not get the option of adding HTML in a source editor. To add HTML content you need these steps:

1.  Select the text area in the webpart as shown in the screenshot below:


2. Now have a look into the ribbon under editing tools. You will get an option to insert HTML.

3. Now you will get a screen like this


4. Now you can proceed further.

A note about inserting code

If you choose to add any code (i.e. CSS or JavaScript) you'll need to insert your code using this HTML Source method. In addition, after adding code into a Content Editor Web Part it is best to always edit the content of the Content Edition Web Part using the HTML Source method to ensure your code remains intact.