Forum Moderators: open
this seemed to work. but is it kosher? does it not conform to w3c standards? because i tried running the file through their validator, and wasnt clear on the results.
You're right to suspect that a well-formed HTML page only contains one <head></head> section. Still, I would imagine that your code works in most recent brwosers.
However, if the SSI only writes "head section" javscript, why not place that javascript in a .js file and call that instead, from the original <head> section?
Just use:
<script type="text/javascript" language="JavaScript" src="file.js"></script>
On a technical note, the validators are comparing your page to a file called a Document Type Definition or DTD. A DTD tells the validator precisely what tags and attributes it can expect, among other things. In other words, it tells anyone who is asking, which rules you are playing by. The first line of your HTML file should state which DTD you are working with. If you look at the W3C DTDs for HTML, they all state that there should be exactly one head tag. An example of a DTD can be found at view-source:http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd. This is the DTD for XHTML 1.0.
As a historical note: In Netscape version 1, if you used two title tags, they would alternate in the title bar. Fortunately, they put a stop to that in version 2.