Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 element that allowed be anywere

I am developing library, that helps dynamicly loading design.

Here the little example:

A.EJS

This is the a.ejs file

B.EJS

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

Will be staged as

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

And rendered(as soon as design loaded) as

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

Here the problem. If i am using that construction

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

then i gets wrong design, cause <div> permitted to be in <table>.

Question: with what HTML element i should straight my goals? OR what element allowed to be both inside and outside <table> element?

like image 544
Offenso Avatar asked Feb 19 '26 12:02

Offenso


1 Answers

It's kinda messy but the W3C validator says that a <script> tag 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 at http://validator.w3.org/check

like image 99
Brian Peacock Avatar answered Feb 22 '26 01:02

Brian Peacock



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!