Creating new master page and page layout
SharePoint Online uses a set of default master pages for the basic structure of all pages in a subsite. The default master pages include the commonly used Seattle and Oslo. However, SharePoint developers may choose to create their customized master pages and apply them on their sites. With customized master pages, admin can design their own navigation bar, page footer, side navigation and other desired features as they wish to fulfill different business needs.
Master pages serve as a skeleton of all the page in a site, it provides an identical look and feel to all pages. On the other hand, page layouts define the body content of each page., including the alignment of the webparts or webpart zones in the page.
To create a new master page or page layout, first we go to Site Settings under the site that we want to apply our customized pages. In Site Settings, look for Master pages and page layouts under Web Designer Galleries as shown in the picture:
In the master page gallery, we can see a full list of existing page layouts and master pages. To create our own master page or page layout, under FILES ribbon, click on the dropdown option of New Document and select either Html Master Page or Html Page Layout respectively to create a new master page or page layout.
Give the new master page a name and save, the system will automatically generate an empty template of master page in .html and .master extensions. We shall never have the need to modify the .master file, all the customization will be done in the .html file and it will automatically be reflected on the .master file. The steps to create a new page layout is similar.
It is recommended to use SharePoint Designer for the customization of the new master page and page layout. Remember to publish them as major version after editing and saving or users without admin right will not be able to see the newest changes.
Applying the customized master page and page layout to our site and pages
Once we have the customizations done on our new master pages and page layouts, we are ready to deploy them to our site and see some changes.
To apply master page, go to Site Settings again and look for Master page under Look and Feel.
Here we can choose if our site wants to inherit master page used by its parent site or to use a specific a master page. Choose your customized master page from the dropdown choices and click OK to apply.
To apply a page layout, navigate to the page that we want to change and click on Edit page on the gear button. Click on the Page Layout dropdown menu on the top ribbon and select the new page layout that we want to apply and save the page.
To this point we have learned how to create and apply our own master pages and page layouts. It is also convenient to save your master pages and page layouts and simply upload them to another site collection to use.