Please do this minor fix! (Improper ampersand HTML encoding in the ad link.)

I’m not extremely tech savvy so please bear with me!

I believe this would be a site-wide fix so I am not adding my information yet unless needed.

I like to have my HTML markup validated as error free.

000webhost is adding a few lines to the end of my index.html for their ad. (Please note: I do not have a problem with that at all. I understand that is how they let us have free hosting.)

Unfortunately they have a very minor HTML error in the ad URL.

It contains (at least) 2 unencoded ampersands (&). Ampersands should be encoded as & even inside URLs.

This is throwing errors in my HTML markup validation for my website.

If someone could fix this that would be awesome.

It should not affect your ad in any way. In fact, it might help in certain browsers since it would be more HTML compliant.

I’ll try and be more specific just in case that is not clear. The link added to my HTML is something like this:

{snip}.com/?utm_source=000webhostapp&utm_campaign=000_logo&utm_medium=website {snip}

While it should look like this:

{snip}.com/?utm_source=000webhostapp&utm_campaign=000_logo&utm_medium=website {snip}

And this is exactly what my validation service tells me:

I’ll notify the admins about it to see what they can do.

Thank you very much.

2 Likes

Just wanted to say thank you very much to whomever fixed the ampersands in the ad url!

I hope I’m not being annoying but there is 1 final error in the ad line…

This one won’t actually be an error in the future as it’s not required in HTML 5 but it still throws an error in HTML 4.01 Transitional. (There’s no reason not to have it since HTML 5 will accept it, it just doesn’t require it.)

The element <script> is being used without it’s “type”.

So instead of this: <script>

It should be this: <script type="text/javascript">

Or perhaps this: <script type="application/javascript">

(The first one, text, would support all browsers, even the oldest of old. The second one, application, is accepted by those newer than 2006 or so. But all support the old way as well, so most people still use the “text” one for maximum compatibility.)

As far as I am aware this doesn’t actually do anything since it expects javascript normally, but it throws an error anyway. HTML 5 defaults to javascript like HTML 4 technically does (even though by requiring “type” they always wanted us to believe 4 didn’t)… it’s just that the requirement part, even when using javascript, was removed. (I believe the original idea was it was for letting the browser know if an alternate media type was being used, thus speeding up execution a tad.)

Again as I said in the OP I’m not exactly a tech expert so I might not have explained everything perfectly!

Link for info:

https://www.w3schools.com/tags/att_script_type.asp

Link to media types just in case the script int he ad isn’t javascript for some reason:

http://www.iana.org/assignments/media-types/media-types.xhtml

Copy of actual error:

required attribute “TYPE” not specified

com"></a></div> <script>function getCookie(cname) {var name

The attribute given above is required for an element that you’ve used, but you have omitted it. For instance, in most HTML and XHTML document types the “type” attribute is required on the “script” element and the “alt” attribute is required for the “img” element.

Typical values for type are type=“text/css” for <style> and type=“text/javascript” for <script>.