Title tag error

I got an error when putting in a title tag not sure why its saying this.

Line 15, Column 7: Element title not allowed as child of element head in this context. (Suppressing further errors from this subtree.)
    <title>IOG Products, LLC</title> 
    Contexts in which element title may be used:
    In a head element containing no other title elements.
    Content model for element head:
    If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content, of which no more than one is a title element and no more than one is a base element.
    Otherwise: One or more elements of metadata content, of which exactly one is a title element and no more than one is a base element.

You havenā€™t shown us what the HTML giving that error looks like.

The most likely cause of that message is that there are two <title> tags in the <head>

1 Like

I dont know which it is either ha the line and column it gives me of where it is irrelevant to my pagesā€¦I think its this one

 <%@ 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">
    <title>IOG Products - Impact Indicators, Impact Recorders, Temperature Recorders, Tilt Indicators</title>
    <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>

You didnā€™t show to the closing head tag so there may be another title tag. i.e.
<title>IOG Products, LLC</title>
does not look like
<title>IOG Products - Impact Indicators, Impact Recorders, Temperature Recorders, Tilt Indicators</title>

Also weā€™d really need to see the outputted HTML since there may be hidden stuff in that ASP code (I dunno ASP so Iā€™m not sure what that all does.)

The outptuted HTML can be seen by viewing the source in browser.

http://www.iogproducts.com/

If thatā€™s the site the OP is referring to, it has two tags in the head

Not surprisingly, guess what line 15 is

You need to remove one or the other if you want it to validate. If you really want to improve your SEO you should clean these up too

<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" />

It would have been far more obvious if all those script tags were at the bottom of the body where they belong.

I only have one titleā€¦

 <%@ 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">
    <title>IOG Products - Impact Indicators, Impact Recorders, Temperature Recorders, Tilt Indicators</title>
    <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>

This is not for debate. You literally do have two title tags. Look at the rendered source!

What does this run? Look like one of your title tags is in here.

<asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>

I donā€™t know ASP so I donā€™t know what that does. 100% confident that your second title tag is there though (or later on in your code that you excluded.)

Ok.

Example? Nothing is invalid and you donā€™t need to have </meta> in HTML5.

@RyanReese is right you dontā€¦

End it with ā€˜>ā€™:. This is a way to close childless elements.

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

csosa, Both of your titles are exactly the same. Remove the title that you SEE in your code. Save the page, and post back here once you are done.

And @Amit_Yaron you donā€™t need to do that in HTML5, as I already have said. Please read my posts. HTML5 does not need it.

I did it I only have one title tag but in the view page source it says I have another empty title tag which I dont see in my code page here it isā€¦

 <%@ 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>

Please re-read post #10. Iā€™ve explained this already.

I also gave a solution if you donā€™t know ASP in post #17

Please look at those posts.

Iā€™ve mentioned already that the ASP code in post #10 most probably has the other title tag in it somewhere.

Yes I took that one off alreadyā€¦but now im getting this errorā€¦which is an empty title tag that I dont see in any of my files based on the page source.

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

Weā€™ve gone over this. Your ASP code is hiding the title tag. You STILL(!!!) have two title tags.

<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>

Do you know how to view the HTML source in your web browser (e.g. the rendered output that validators are using?) I do not believe you understand this.