Error: Bad start tag in p in head.

Melody Scott
Melody Scott used Ask the Experts™
on
Hi, on my site magickitchen.com, when I validate a page on https://validator.w3.org I get (amongst other errors):
Error: Bad start tag in p in head.

From line 19, column 17; to line 19, column 47

<noscript><p class="bg-warning noscript">↩    

It's because I have a paragraph tag inside a noscript tag in the head area.

Then, because of that error, it cascades, won't see the end head tag, etc.

What would be a better way to do this noscript tag, so that it doesn't give me that error?

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Commented:
No way to guess without a link to your site.

Provide the full URL you passed to the validator + likely someone can assist you.

Author

Commented:
I never understand why people don't understand that magickitchen.com is the site. Add an https:// to it.

Or just copy magickitchen.com into the address bar. I don't like adding a link, or the next time I search google, experts-exchange comes up.
Dr. KlahnPrincipal Software Engineer

Commented:
I don't like adding a link, or the next time I search google, experts-exchange comes up.

With all due respect, unless we see the actual URL that is causing the problem, we are just speculating on indirect evidence.  

But, aside from that, another incoming link to your site will only raise your search engine rating.  Incoming links from well-linked and respected sites are a large part of how search engines rate your site.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I don't understand how magickitchen.com is not a URL. You are all experts, you know that if you copy that and paste it into a web browser address bar, a site will come up.

What am I missing? It ends with a dot com, it's a url.

Author

Commented:
But since you seem hell-bent on me adding the link, here it is: https://www.magickitchen.com.

Author

Commented:
Sorry, that sounded way too cranky. I just really don't understand, though, why it is that  you wouldn't just copy and paste that dot com into a browser. Apologies for the tone.
Dr. KlahnPrincipal Software Engineer

Commented:
What am I missing? It ends with a dot com, it's a url.

Um, ... heh ... I dislike to add fuel to a fire, but that's not correct.  A naked domain name is not a URL.

https://en.wikipedia.org/wiki/URL

Every HTTP URL conforms to the syntax of a generic URI. The URI generic syntax consists of a hierarchical sequence of five components:[14]

URI = scheme:[//authority]path[?query][#fragment]

where the authority component divides into three subcomponents:

authority = [userinfo@]host[:port]

For HTTP, all URLs begin with "https://" (secure) or "http://" (insecure).  There are many other types of URLs for other protocols, e.g., ftp:// but HTTP URLs are the most commonly seen.

So in fact, no, a naked domain name is not a URL.  A browser will try to convert a naked domain name to a URL that (if there is a web server at the site referred to by that domain name) the server will accept, and if it is successful, the naked domain name in the address bar should then be replaced by the actual URL.

And that is why we need actual URLs.  The problem might not be occurring on the server at that domain name, it might not be occurring on secure URLs (or insecure URLs), the server might have a different address (domainname.com and www.domainname.com are usually different sites), the server might not rewrite an incoming naked URI to something useful, and the problem might not be occurring on all URLs on that site.

The more information you give us, the better we can help.

Author

Commented:
ok, thanks for the explanation. Please see url above.
Fractional CTO
Distinguished Expert 2018
Commented:
Missed your site name mentioned.

The message is correct - <p> appearing in <head> section are incorrect, contrary to incorrect <noscript> snippets provided by many sites, including Facebook.

Just move the <noscript> part somewhere out of head into body.

As for the other validation messages. I'd personally fix them all.

My personal rule is I only publish pages which are valid HTML. Yes it's true some errors/warnings can be ignored + the problem is which ones are acceptable to ignore + also if you have 50 errors usually, then all of a sudden have 51 errors, you have to find the new one + debug it.

My preference is simple. 100% valid HTML, so if any single error/warning pops I know, I best fix it.

Author

Commented:
Ah, didn't realize I could just move it into the body, thanks!

Sorry for my crankiness, I'm having a day.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial