HTML5 element that allowed to be any

I am developing a library that helps to dynamically load a design.

Here is a small example:

A.EJS

This is the a.ejs file

B.EJS

<b><%= phoxy.DeferRender('a', {}) %></b>

Will be delivered as

<b><div id="phoxy_defer_render_4523fkdjfdfsi"></div></b>

And it is displayed (as soon as the project is loaded) as

<b>This is a.ejs file</b>

Here is the problem. If I use this construct

<table><%= phoxy.DeferRender('a', {}) %></table>

then I get the wrong design cause <div>allowed to be in <table>.

Question: with which HTML element should I hide my goals? OR which element is allowed both inside and outside the element <table>?

+3
source share
2 answers

This is useless, but the W3C validator says the tag <script>will work:

<!DOCTYPE html>
<html>
  <head>
    <title>Test</title>
  </head>
  <body>
    <table>
      <script type="text/html" id="phoxy_defer_render_4523fkdjfdfsi"></script>
    </table>
    <ol>
      <script type="text/html" id="phoxy_defer_render_anothertag"></script>
    </ol>
  </body>
</html>

You can check out http://validator.w3.org/check

+1

, , , HTML, .

:

ul ol , li.

dl dt dd

table reqires thead, tbody tfoot, tr, td.

-, , HTML .

, catch, <span>, HTML .

0

All Articles