I want to embed some HTML on my website… I would like that:
- SEO: that content can be crawled and indexed
- Integration: it renders nicely (does not break my DOM trees for instance, or does not inherit my styles)
- Security: it remains safe for our user (javascript disabled)
- Flexibility: the HTML can be completely free (don’t want any BBCode or MarkDown or even TinyMCE, it’s our users that are writing the HTML code…)
I saw that I might be able to use the IFrame for that, but I am not sure it is a very good solution concerning my SEO constraint.
Any answer would be greatly appreciated!!! Thanks.
For your requirements (rendering and security, primarily), IFRAME seems to be your only option, especially when we consider no rules are specified for the HTML content except the JS removal. Even some CSS + ‘a’ tag can bring a serious security risk, like overlaying outgoing links on your standard interface.
For the SEO part, you can use SEO maps to show the search engines the relation between the content and the container, also use html tags like link to make connection.