Content editor web parts are very useful if you want to add HTML, text, or script content to a SharePoint web part page. In this SharePoint Online tutorial, I will show you how to use the content editor web part in SharePoint Online.
Content editor webpart in SharePoint Online
Microsoft introduced the content editor web part in SharePoint and popularly used it in various SharePoint versions. You can use the content editor web part in SharePoint to add text, HTML, tables, images, and videos, and you can also format text to a SharePoint web part page.
In SharePoint, we can use content editor web parts to display rich content, HTML, javascript, CSS, etc. We can add content directly to a content editor web part in SharePoint. Also, we can refer to external HTML or JS files in SharePoint using the content editor web part.
Add content editor web part to SharePoint web part page
Now, we will see how to add a content editor web part to a SharePoint web part page.
- Once you open the SharePoint web part page, click on Page -> Edit page in the ribbon, like below:

- Then, in the edit mode, click on Add a web part, and then from the list of web part categories, select “Media and Content” -> then select Content Editor web part like below:

- Once you add a content editor web part to a SharePoint web part page, it looks like below:

- You can click on Click here to add new content link in the content editor web part to add content directly to the page. This will basically open a rich text editor where you can add or format content.

- Here, you can see the rich text editor, where you can format text and add headings like h1, h2, h3, etc. To add HTML or JavaScript code inside the content editor web part, Click on FORMAT TEXT from the ribbon and then click on Edit Source like below:
