Title Error

HI im getting a validation error on my title tags that supposedly I have two but I can seem to find it in my files.

Error Line 31, Column 7: Element title not allowed as child of element head in this context. (Suppressing further errors from this subtree.)
<title>

This is the code I have in my files but the view page source seems to be interpreting something different in my website iogproducts.com

 <%@ Master Language="VB" AutoEventWireup="false" CodeBehind="main.Master.vb" Inherits="IOG.Site1" %>
<!doctype html>
<html lang="en"> 
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="/Scripts/jqddm.js" type="text/javascript"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <link href="~/Styles/style.css" rel="stylesheet" type="text/css" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400' rel='stylesheet' type='text/css'>
    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;libraries=places"></script>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder> 
    
<script type="text/javascript">
       
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-41887506-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>    
</head>

Your website has the following markup in the header:

<!doctype html>
<html lang="en"> 
<head><meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="/Scripts/jqddm.js" type="text/javascript"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <link href="Styles/style.css" rel="stylesheet" type="text/css" /><link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;libraries=places"></script>
    
<title>IOG Products - Impact Indicators, Impact Recorders, Temperature Recorders, Tilt Indicators</title>
<meta name="description" content="IOG products are used throughout the production process and during the journey to the ultimate end-user. By attaching our monitors to your shipment it enables you to take more control of your product during transit and helps to reduce your risk by keeping track of them every step of the way. " /> 
<meta name="keywords" content="IOG Products, transporation monitoring systems, omni-g, impact recorder m series, impact recorder, protect-a-pak, single use tilt indicator, tilt indicator, digital impact recorder, data recorder, single use shock recorder, impact-o-graph, IOG" /> 
 
    
<script type="text/javascript">
       
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-41887506-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>    
<title>

</title></head>

So yes there are two title elements.

So something you are doing is wrong. Could be you are looking at source from the wrong directory, your putting it in with ASP some how, or a cache problem. (Or something else :stuck_out_tongue: )

Yeah I cannot seem to locate that title tag I dont know where it is coming from…I only have one directory…what do you mean I am putting it in with ASP?

Well looking at the code you posted, it looks like it probably isn’t something in the ASP code you have written.

It should be easy to totally rule out if the server is pointing to a different directory that has an earlier copy of your code in it, or a cache problem. Try changing something obvious in the file you say the extra title tag isn’t in, refresh the page, and see if the obvious change has changed on the page you are served in your browser. (maybe put <h1>TESTING</h1> right at the top of the body or something.

If the obvious change comes through and is served to your browser it must be something to do with your ASP code, otherwise you know it is a directory or cache problem.

So I did that testing it went through…not sure what to check with my ASP code though there is only two files that title tag could be in which is main.Master and Default.aspx but its not in there…It cant be a cache problem I already cleared it and its still there…how would it be a directory problem?

Sometimes the server can be pointing to a directory with old code in by mistake. Can be caused by a number of mistakes. It was just a possibility this could be the problem but as you changed something obvious and the change went through, that has proved the wrong directory theory to be wrong.

All I can think of is you must be doing something in your ASP code to cause it. No other possible way comes to mind. One way to test that might be to comment out any asp in your file, and just serve the html markup. See if the extra title disappears. If it does, you know it is definately in the ASP code in your file. If not, it could be ASP from outside your file in the way the server is set up or something, but that is out of my scope of knowlege as I am a PHP guy.

Alright thanks.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.