Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Need help in validation errors

Posted by: SSharma Oct 28 2014, 11:19 AM

Hi guys,
M new to this validation process nd just trying to validate my single webpage coding.. nd getting these errors


HTML5 Validator Error ✉
Line 7, column 1: Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>.
Line 7, column 1: Element head is missing a required instance of child element title.
Line 8, column 15: Stray doctype.
<!DOCTYPE html>
Line 9, column 53: Stray start tag html.
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
Line 9, column 53: Cannot recover after last error. Any further errors will be ignored.
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
part of coding is as follows-

@{
Layout = null;
ViewBag.Title = "Login";
}

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

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">


Can nyone help me in resolving dese errors... ????

Posted by: Brian Chandler Oct 28 2014, 11:30 AM

The basic principle of dealing with errors like this is that if you can't see what anything else means, just clear the *1st* problem. I think you have space characters before the <? that starts everything off. So remove them, and see what happens.

Posted by: Frederiek Oct 28 2014, 05:11 PM

The basic set-up of an HTML 5 page looks like this (created with a single keystroke in BBEdit (Mac only))

CODE
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Untitled</title>
</head>
<body>

</body>
</html>


I'm not sure why a xmlns attribute is used on the html element.
Post the url to your page, so we can a better and further look.

Posted by: SSharma Oct 29 2014, 10:19 AM


yess...u r rite...thanks fr d help

QUOTE(Frederiek @ Oct 28 2014, 06:11 PM) *

The basic set-up of an HTML 5 page looks like this (created with a single keystroke in BBEdit (Mac only))
CODE
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Untitled</title>
</head>
<body>

</body>
</html>


I'm not sure why a xmlns attribute is used on the html element.
Post the url to your page, so we can a better and further look.


Posted by: Frederiek Oct 29 2014, 11:51 AM

You're welcome.

Posted by: Biplab Acharjee Nov 30 2020, 11:20 PM

Hello, I am using Wordpress and Installed Generatepress theme
After Checking my Url to validator w3 I got the following error message-

1.Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>.
2.Element head is missing a required instance of child element title

And Also My Site Layout Is break only in Home Page, Rest of my blog pages and posts are looking fine.

Please Help Me. sad.gif
Please check my blog - http://www.24freejobalert.com

Posted by: pandy Dec 1 2020, 06:16 AM

I get a lot of errors, but not the ones you ask about. Is that maybe for a sub page rather than the one you linked to? Did you use the w3c validator or something else?

https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.24freejobalert.com%2F&showsource=yes

Also, in the future please start a new thread for your question. This thread is 6 years old and it's easier to find stuff it there is a dedicated thread for each issue. smile.gif




Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)