Dear Christos Katsaitis Private,
I hope you're doing well too! When it comes to adjusting a SharePoint webpage, you’re correct that SPFx (SharePoint Framework) is mainly used for customizing specific web parts. Unfortunately, SharePoint does not support direct HTML or full-page customization with programming languages for the entire page in the way traditional websites do.
However, you do have a few options:
Use a Script Editor Web Part (deprecated in modern SharePoint):
In classic SharePoint, you can use a Script Editor Web Part to embed HTML, CSS, and JavaScript directly into a page.
First make sure you have enabled the custom script, Enable Custom Scripts for a Site in SharePoint Admin Center.
Here is how:
- Sign in to the SharePoint Admin Center: https://<tenant>-admin.sharepoint.com.
- Expand “Sites” and click “Active sites” from the left navigation. Select the site from the list by clicking on the site name link.
- On the site properties panel, Click on the Settings tab. Click on the “Edit” link under “Custom Scripts”.
- Select “Allowed” settings for Custom scripts. Click on “Save” to commit your changes.
Then please go to site pages library, create a new "webpart" page.
Click Add a webpart > Under "Content and Media" category, find "Content Editor" or "Script Editor" and insert it. You can add your HTML code here.
To add an HTML code to modern pages:
- Open your SharePoint Online site in the web browser.
- Upload the .aspx file and its associated resources, like scripts and images, to any of your SharePoint libraries, such as “Site Assets”. Ensure any references to these images/styles/scripts are updated in the ASPX file.
- Once uploaded, navigate to the page where you would like to add HTML code and edit the page.
- Insert an “Embed” web part wherever relevant. This web part allows you to display HTML code directly into the web part. You can use this method if you want to add a small piece of code from another page. Set the Embed source address to the ASPX file you have uploaded.
Use Third-Party Tools and Solutions:
There are also third-party tools and solutions available that can help you customize SharePoint pages, including some that allow you to directly edit the HTML and CSS of modern SharePoint pages. However, it's important to carefully evaluate these solutions to ensure they meet your needs and are compatible with your SharePoint environment.
In summary, while it's not possible to directly edit the HTML of a modern SharePoint page like you might in a traditional web development environment, you may choose upper several available options for customizing SharePoint pages to meet your needs.
Should you have further queries, please feel free to reach out.
Best regards,