How To Add An HTML Page To A SharePoint Site

Today, I am writing about how to add an HTML page to SharePoint site pages. We have several options to attach CSS in SharePoint.

With the help of custom HTML embedded code, we can attach a custom style sheet to the site, add one or more CSS files to the master page used in the site, add CSS directly or a <link> in either the OOB Content Editor Webpart or HTML Form Webpart, link CSS inside the custom aspx page as well.

Let us study a simple example of adding an HTML page. To create, the steps are given below.

  • Login to the Project or Team site page with the user account and password.
  • Initially, open SharePoint site. Next, you need to navigate to the site’s home page. Go to the Page tab and click Edit menu option or click on Gear box setting and click on Edit page from the dropdown option.

    SharePoint

  • On the edited page, locate the INSERT tab. On this tab, click the Embed Code option.

    SharePoint

  • We will get to see a blank code field. Here, we need to add some suitable HTML code into the code field. For example, I am inserting demo HTML code. We can notice here that we will get an output with the help of the embedded code.

    SharePoint

  • Once everything is done, click insert option, as shown above and finish adding HTML code in the code field. We will now see that HTML snippet has been inserted successfully.
  • Now, click stop editing page and we can see the output, as shown below.

    SharePoint

  • Finally, click save to make the changes permanent.