HasanMerkit It depends on what you want to do of course, for example if you want to put an animated accordion you can put the html in fof/pages and the script that makes the accordion effect work in the footer that way it could work. In more complex cases it would probably make more sense to make an extension for it.
On the other hand you have Clark's project https://discuss.flarum.org/d/28770-pages-generator which I use to have clean URLs without /p/ and he also plans to add a lot more depth and complexity, it's not officially released yet, but it could be a base point for you to extend it.