How can I create my own custom HTML CSS file to a default template in share point?

Moheed Gillani 10 Reputation points
2023-03-18T10:11:37.8866667+00:00

I want to create a my own default html CSS template that user can use and edit and available in the list that in image below.

Note:-I want to create my own layout HTML/CSS and then need to convert it to the default templateUser's image

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,486 Reputation points Microsoft External Staff
    2023-03-20T02:23:42.71+00:00

    Hi @Moheed Gillani

    Per my research, there is no such function to add css file to default template. You can refer to the following document, the document list the operation supported by SharePoint currently.

    https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/customize-default-site-design

    As a workaround, you can use spfx Extensions to insert the css file to sharepoint site. The document for extensions for reference

    https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/overview-extensions

    Sample for react-add-js-css-ref

    https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-add-js-css-ref


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.