HTML code in Sharepoint WebPart not working

%3CLINGO-SUB%20id%3D%22lingo-sub-1723021%22%20slang%3D%22en-US%22%3EHTML%20code%20in%20Sharepoint%20WebPart%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1723021%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20insert%20a%20simple%20HTML%20webpart%20in%20my%20SharePoint%20Page%20but%20after%20entering%20the%20HTML%20code%20nothing%20happens%20it%20stays%20as%20is.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId-554196361%22%20id%3D%22toc-hId-554196361%22%20id%3D%22toc-hId-554196361%22%20id%3D%22toc-hId-554196361%22%20id%3D%22toc-hId-554196361%22%20id%3D%22toc-hId-554196361%22%20id%3D%22toc-hId-554196361%22%3EMy%20First%20Heading%3C%2FH1%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3EMy%20original%20code%20is%20different%20but%20I%20tried%20above%20code%20as%20well%20but%20it%20just%20doesn't%20work.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1723056%22%20slang%3D%22en-US%22%3ERe%3A%20HTML%20code%20in%20Sharepoint%20WebPart%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1723056%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F567257%22%20target%3D%22_blank%22%3E%40addy2020%3C%2FA%3E%26nbsp%3BHello%2C%20what%20web%20part%20are%20you%20currently%20using%20to%20insert%20html%20elements%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1723438%22%20slang%3D%22en-US%22%3ERe%3A%20HTML%20code%20in%20Sharepoint%20WebPart%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1723438%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F284426%22%20target%3D%22_blank%22%3E%40ArefHalmstrand%3C%2FA%3ECode%20Snippet%20webpart%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I want to insert a simple HTML webpart in my SharePoint Page but after entering the HTML code nothing happens it stays as is.

 

<h1>My First Heading</h1>

 

My original code is different but I tried above code as well but it just doesn't work.

6 Replies
Highlighted

@addy2020 Hello, what web part are you currently using to insert html elements?

Highlighted

@ArefHalmstrandCode Snippet webpart

Highlighted
That web part only shows the code lines on the page. Use this link below to implement the correct web part.

https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-script-editor
Highlighted

@ArefHalmstrandI'm a sharepoint user. You sure I can implement this script webpart. I don't see modern code snippet available as shown in the link you shared.

Highlighted
You will need access to the app catalog. This is a SPFx solution built by the PnP community. You need to download the solution, bundle it into a sppkg and upload it to the app catalog. Then you will be able to use it on a SharePoint page.
Highlighted

@ArefHalmstrandNever did before what you're saying. Can you guide me or share some link for it?