Código:
######################################################################
<html xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="es">
<head>
<title>Un documento con un tratante</title>
<handler type="text/x-vbscript"
src="http://example.org/progs/vbcalc">
<handler type="text/javascript">
...algun JavaScript en linea...
</handler>
</handler>
</head>
<body>
<handler type="text/x-perl">
... algún script Perl...
</handler>
</body>
</html>
######################################################################
Por lo general lo incluimos de la siguiente manera:
Código:
######################################################################
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" >
<head>
<title>Un documento con un tratante</title>
<script type="text/javascript" src="js_paginator.js"></javascript>
<script type="text/javascript">
...algun JavaScript en linea...
</script>
</head>
<body>
<script type="text/javascript">
... algún JavaScript en linea...
</script>
</body>
</html>
######################################################################
El texto dentro de las etiquetas "javascript" o "handler"
se deben de insertar de la siguiente manera:
Código:
######################################################################
<script type="text/javascript"><![CDATA[
...
]]></script>
######################################################################
Pero como existirán navegadores que no lo interpretan como tal, una
forma universal de hacerlo, sería así:
Código:
######################################################################
<script type="text/javascript"><!--//--><![CDATA[//><!--
...
//--><!]]></script>
#####################################################################
Así es la forma correcta de enviarlo, tanto al servirlo como:
aplication/xml, aplication/xhtml+xml y text/html.
Para hojas de estilo, tipo text/css, se insertan al igual que al
insertar código javascript, mientras que la forma universal, varía:
Código:
#####################################################################
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
...
/*]]>*/--></style>
#####################################################################