On Sep 10, 9:49 am, Mr Speaker <mrspea...@gmail.com> wrote:
> I think it's perfectly valid to have a div inside a script tag (or at

It is never valid markup in an HTML document, a div element can't be a
child of a script element.

> least useful), if a div makes sense to the TYPE you defined for the
> script.

If you want to discuss HTML markup, then an HTML group would be a much
better place to do that:

<URL: 
http://groups.google.com/group/comp.infosystems.www.authoring.html/browse_frm/thread/73b5d54124d8c0dc#
>

The content of a script element is not considered markup, it is
script.


> For example, John Resig uses a script tag with type "text/
> html" in his micro-templating 
> solution:http://ejohn.org/blog/javascript-micro-templating/

I think that is a very bad idea for a web page. What advantage does
that approach have to assigning the string to a variable and using a
script language that the browser understands?

He demonstrates that a script element can contain random text, and
sets a trap for any browser that dares to be standards compliant and
end the script element at the first occurrence of </.


> In this instance though (and in reply to the original author) you add
> an ID to the SCRIPT tag,

While browsers tolerate that, it is invalid markup.


--
Rob

Reply via email to