Click here to Skip to main content
15,922,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I dont understand why , but my code between <head> tags get render under <body>



SiteMaster code

ASP.NET
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="GPO.SiteMaster" %>


<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head  runat="server"> 
    <meta name="ROBOTS" content="index,follow" />
    <meta charset="UTF-8" />
    <meta http-equiv="content-language" content="en-US" />
    <meta name="audience" content="all" />
    <meta name="Author" content="Global Property Online" />
    <meta name="revisit-after" content="2 days" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta id="metadesc" name="description" content="Global Property Online - Property for sale or rent Houses, Villas, Apartments, Cottages, Country Homes, Land & Businesses. We also list your properties with our RSS feed parser system."  runat="server" />
    <meta name="keywords" content="mobile,desktop,responsive property site,xml2u,kyero,rss,feeds,xml,properties from feeds,from xml2u,property feed parsing,xml parsing,property,farms,houses,apartments,properties,land,villas for sale,businesses for sale,private property,Feeds, RSS feeds, convert currency,international,agent, list properties" />
  
    <link href="Content/responsivemobilemenu.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="Scripts/jquery.min.js"></script>
    <script type="text/javascript" src="Scripts/responsivemobilemenu.js"></script>
  
    <asp:ContentPlaceHolder ID="Head" runat="server"></asp:ContentPlaceHolder>
    <link href="Content/Site.css" rel="Stylesheet" type="text/css" />
    <link rel="icon" type="image/png" href="favicon.png" />
    <title></title>
    <style type="text/css">
        a {
            text-decoration: none;
        }
    </style>
</head>
<body>
<div id="container_l">
    <form id="Form1"  runat="server">
        
            <input type="hidden" name="MyFormSearchVal" value="yes" />
            <!--DWLayoutTable-->
            <div style="text-align: center;     float: left;
    padding-left: 20px;">
                <img src="/images/GPO.png" alt="Logo" />
               
            </div> 
        <div style="float: right; padding-removed 20px;"><asp:Label ID="lblWelcome" runat="server"></asp:Label>
                <asp:LinkButton ID="lnkLogout" runat="server" OnClick="lnkLogout_Click"></asp:LinkButton></div>
      <div style="clear:both;"></div>
            <div class="rmm">
                <ul>
                    <li><a href='Default.aspx'>Home</a></li>
                    <li><a href='Register.aspx'>Register</a></li>
                    <li><a href='Members.aspx' id="mnuMember" >Login</a></li>
                    <li><a href='ContactUs.aspx'>Contact Us</a></li>

                    <li><a href='TermsAndCondition.aspx'>Terms and Conditions</a></li>
                     <li><a href='About.aspx'>About</a></li>
                </ul>
            </div>
            <div class="removed" style="color: white; text-align: center;">
                <asp:ContentPlaceHolder runat="server" ID="Default">
                </asp:ContentPlaceHolder>
                <div style="margin-removed auto; margin-removed auto;">
                    <img src="Images/loader.gif" id="imgLoad" alt="Loading" style="display: none; margin-left: auto; margin-right: auto; width: 32px; height: 32px;" />
                </div>  
                <div style="clear:both;"></div>
                <div class="map">
                <a href='Default.aspx'>Home</a> | 
               <a href='Register.aspx'>Register</a> | <a href='ContactUs.aspx'>Contact Us</a> |<a href='TermsAndCondition.aspx'>Terms and Conditions</a> | <a href="Latest.aspx">Lastest 1000 property map</a>
            </div>
            </div>
          

        
    </form>
    <br />
    <br />


</div>

</body>
</html>

[url removed]
Posted
Updated 22-Sep-15 23:24pm
v3

1 solution

View the source (view view->source, not via the dev tools) and you'll see your head is not inside the body. However your html is invalid, you are rendering a p tag before the html so the browser is probably re-arranging the DOM on the fly to something it thinks is valid, and that is what you're seeing in the browser's dev tools.
 
Share this answer
 
Comments
Member 10146034 23-Sep-15 5:42am    
Yea thank you it was due to a response.write command that outputted a tag infront of html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900