473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to nested a script type tag ?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <title>
6 Dinosaur Quiz
6 </title>
7 <meta http-equiv="Content-Script-Type" content="type">
8 next problemprevious problemE612 This tag or content is not allowed here:
<script type="text/javascript">
65 </script>
67 </meta>
68 </head>
69 <body>
70 <script type="text/javascript">
130 </script>
131 </body>
132 </html>
Apr 4 '11 #1
7 2025
Oralloy
988 Expert 512MB
Why do you need the enclosing meta tag at all?
Apr 4 '11 #2
Dormilich
8,658 Expert Mod 8TB
technically, in XHTML you need to close every tag, but since no-one really uses XHTML it doesn’t matter. it’s just a HTML sytax error (<meta> elements must not have children).
Apr 4 '11 #3
Oralloy
988 Expert 512MB
Which tag isn't being closed?

All I was asking was why the <script> tag is inclosed in the <meta> tag.
Apr 4 '11 #4
Dormilich
8,658 Expert Mod 8TB
nope. <meta> is an empty element.
Apr 4 '11 #5
Oralloy
988 Expert 512MB
Thus Kathyln's problems.

Since she never answered my initial question, I appreciate your explaining why the code will fail.

Thank you, Dormilich.
Apr 4 '11 #6
Dormilich
8,658 Expert Mod 8TB
in real XHTML you can do some crazy stuff like
<meta name="…" content="…"></meta> and <script type="application/ecmascript" src="…"/>
but don’t do that with a HTML MIME type, that is bound to fail (the first one is invalid (<meta> tags are defined as empty, i.e. <meta … >) and the second one produces an error (because the /> is ignored, it is treated as opening tag and then you run into nesting problems))
Apr 4 '11 #7
Oralloy
988 Expert 512MB
Dormilich,

I really do understand the structural differences between XML and HTML. My understanding is that XHTML is an XML-ized form of HTML (including a strict schema, for those of us who like them). If you ever want a wild schema, look at the IRS schema for e-file version II.

I wasn't aware that the <meta...> tag is defined as empty, however. One learns something every day.

Anyway, I will bow out of this conversation, unless the original poster asks.

Have a most pleasant day.

Cheers!
Oralloy
Apr 4 '11 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Lionel B | last post by:
Greetings. In a template class for which a template parameter may be another template class, I would like to be have access to the type of the nested template parameter. Hopefully the following...
12
by: =?ISO-8859-1?Q?Une_B=E9vue?= | last post by:
two possibilities or the attribute type of script : text/javascript (the one i usually use) application/x-javascript what are the differencies between both ? depends on the html content ?...
4
by: Brian Cryer | last post by:
Out of curiosity, when I use onclick="...some JavaScript ..." why do I not need to flag that its JavaScript, but when I define a script on a page I do need to tag it (<script...
4
vikas251074
by: vikas251074 | last post by:
Hello everybody, Should I use script language attribute or script type? Is there any difference? Until now I have used script language attribute in my all programme where javascript has to be...
2
pradeepjain
by: pradeepjain | last post by:
<script src="getimages.php"></script> i am using this to run a script but dring validation it gives error as " Line 285, Column 51: required attribute "type" not specified. <div...
3
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript"...
2
by: Andrew Poulos | last post by:
If I have code that looks like this: <div id="myID"> <script type="text/javascript"> var foo = function() { // refer to the id myID here }; </script> </div>
9
by: Steve | last post by:
Hi; I've being going through some legacy code on an old JSP site I have been patching. I noticed that when I save the JSP down to my PC as an HTML file I get this javascript error in IE 6 ( ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.