Hi, if this is pure html and js this is for sure possible.
You have multiple options on how to do it. You could just put your code into an html block or you could make a shortcode.
Making a shortcode would probably be the prettier version and it is just as easy as just putting it into an html block
Thank you, Benni. Just to confirm then: I can create in my WordPress site a page with HTML elements like canvas, buttons, etc. controlled by my own JS and CSS, via an “html block” or “shortcode”.
I don’t as yet know what these two are as I have just started to look into WordPress, but I am sure I can learn. If you could kindly confirm the above then I will make a commitment to WordPress. Thanks again.
You can use a custom HTML block to insert exactly that, HTML that isn’t easily composed by using any of the standard blocks. However, do not insert <script> blocks here. Script syntax will likely get mangled if you do.
You can insert <script> blocks via shortcode or a custom block you’ve developed. <script> isn’t the preferred way to introduce scripts. It’s fine for brief snippets that may relate to specific content, but to introduce general script code onto a page, it’s best enqueued as an external file.
If you have very elaborate HTML you need on a page, you might be better off creating a custom page template for the page. It needn’t utilize editor content at all if you prefer. The editor would mainly be to establish a permalink to the page, the template would manage all page content. From templates, you can freely output <script> blocks, but enqueuing is still preferred.