Title: Site validation help
Last modified: August 19, 2016

---

# Site validation help

 *  Resolved [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/)
 * Well, I can make changes in my php-files and stylesheet, but only by trial and
   error. I suppose that this is the reason that a [site validation](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gangleri.nl%2Fnews&charset=%28detect+automatically%29&doctype=Inline&group=0&verbose=1)
   results in numerous mistakes. The report quickly proves that I don’t understand
   much of it all. Just a few examples.
 * > Line 25, Column 62: required attribute “alt” not specified.
   >  …src=”[http://www.xxx.nl/header.jpg&#8221](http://www.xxx.nl/header.jpg&#8221);
   > align=”right” />✉ 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>.
 * This is what is looks like in the source:
    `<img src="http://www.xxx.nl/header.
   jpg" align="right" />`
 * And in the header.php like this:
    `<img src="http://www.xxx.nl/header.jpg" align
   ="right" />`
 * Does the notification mean that I should start using “alt” tags (I think not).
   The code looks fine to me.
 * What about the second one:
 * > Line 37, Column 1: character data is not allowed here.
   >  | `<li><a href="http://
   > www.xxx.nl/articles">articles</a></li>` ✉ You have used character data somewhere
   > it is not permitted to appear. Mistakes that can cause this error include:
   > putting text directly in the body of the document without wrapping it in a 
   > container element (such as a <p>aragraph</p>), or
   >  forgetting to quote an attribute
   > value (where characters such as “%” and “/” are common, but cannot appear without
   > surrounding quotes), or using XHTML-style self-closing tags (such as <meta …/
   > >) in HTML 4.01 or earlier. To fix, remove the extra slash (‘/’) character.
   > For more information about the reasons for this, see Empty elements in SGML,
   > HTML, XML, and XHTML
 * This is a link that my “blogroll” puts in my header.php. Other than that I don’t
   see anything wrong, I wouldn’t know where to change anything, since (as you probably
   know) the header.php simply calls for `<?php wp_list_bookmarks('title_li=&categorize
   =0') ?>`.
 * What about this one:
    “There is no attribute to “action” “ <FORM method=GET action
   =”[http://www.google.com/search”&gt](http://www.google.com/search”&gt); The first“
   s are made red. This is a Google search form that I put into a text widget. It
   works just fine, but this “no attribute” error I get more of. Again, the code
   looks fine to me. Also at the end there is an error, I guess I have to use “/
   >” instead of “>”? That’s an error I have a lot of that I DO understand 🙂 (Btw,
   I see that the Google form is one big error according to w3.org.)
 * Just a few examples that will hopefully make me be able to read these validation
   reports and solve the problems.
 * Thank you in advance.
 * (Oh, I’ve xxx-ed my domain to ‘trick Google’, no need for these forums to turn
   up when somebody is looking for my website.)

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/site-validation-help/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/site-validation-help/page/2/?output_format=md)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680138)
 * _Does the notification mean that I should start using “alt” tags (I think not)._
 * You think not? Why is that? I find that funny, among other adjectives and adverbs.
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680140)
 * Oh, because it doesn’t say “Line 25, Column 62: required attribute “alt” not 
   specified.” as in other errors.
    [edit] Right, I have to learn to read too 🙂[
   edit again] Damn, now it almost all comes down to the Google search. I actually
   hoped to find some mistakes in the sidebar which does not always come out the
   way it is supposed to. Would I better replace that Google search ‘widget’ (or
   get a real one)? What about the “blogroll”, anything I can do there?
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680145)
 * Ok, w3.org has a problem with the Google function that I put in a widget. Every
   WP installation gives one error in the “scrollbar” (which contains six links 
   in each case) as described above.
 * For the rest the errors are quite clear. I never use an “alt” tag (didn’t know
   I had to), I never close an `<img>` tag (dito), I had a `<br>` in the index.php
   that had to be a `<br />`.
 * Unfortunately I didn’t find what I was actually looking for, being the reason
   that in IE and Browzar there’s an empty line between the title and the text of
   the two search widgets that I use (a normal widget and a text widget with a “
   google entire website” function).
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680151)
 * This is going to be a hell of a job, but I get the hang of it. Again a few questions
   though.
    It seems that since 2.3.2 WP corrects mistakes that I make constantly,
   but W3 still marks them as error. For example, I never close an `<img>` tag, 
   but now WP does it, but in another way than W3 seems to prefer, being: `<img 
   src="...></a>< />` (the `</a>` is mine as close of an ahref). W3 now says:
 * > You may have neglected to close an element, or perhaps you meant to “self-close”
   > an element, that is, ending it with “/>” instead of “>”.
 * and
 * > This message may appear in several cases:
   >  You tried to include the “<” character
   > in your page: you should escape it as “<“ You used an unescaped ampersand “&”:
   > this may be valid in some contexts, but it is recommended to use “&”, which
   > is always safe. Another possibility is that you forgot to close quotes in a
   > previous tag.
 * (about the `< />`)
 * Very convieniently WP also auto-generates the `alt` tags that I never used, but
   W3 says:
 * > You have used the attribute named above in your document, but the document 
   > type you are using does not support that attribute for this element. This error
   > is often caused by incorrect use of the “Strict” document type with a document
   > that uses frames (e.g. you must use the “Transitional” document type to get
   > the “target” attribute), or by using vendor proprietary extensions such as “
   > marginheight” (this is usually fixed by using CSS to achieve the desired effect
   > instead).
   > This error may also result if the element itself is not supported in the document
   > type you are using, as an undefined element will have no supported attributes;
   > in this case, see the element-undefined error message for further information.
   > How to fix: check the spelling and case of the element and attribute, (Remember
   > XHTML is all lower-case) and/or check that they are both allowed in the chosen
   > document type, and/or use CSS instead of this attribute. If you received this
   > error when using the <embed> element to incorporate flash media in a Web page,
   > see the FAQ item on valid flash.
 * Wrong bracket??
 * Is this something I should look into?
    And is `/>` the same (or better) than 
   an `< />` like WP makes?
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680152)
 * 1.
 *     ```
       <ul>
       <li class="page_item page-item-2"><a href="http://www.gangleri.nl/news/about/" title="Section intro">Section intro</a></li>
        | <li><a href="http://www.gangleri.nl/articles">articles</a></li>
       ```
   
 * That pipe character | is not allowed there. The only things you can have inside
   a UL are LI’s. Anything outside the LI’s is incorrect.
 * 2.
 *     ```
       <FORM method=GET action="http://www.google.com/search">
        <TABLE bgcolor="#DEC8A6"><tr><td>
        <INPUT TYPE=text name=q size=15 maxlength=255 value="Google">
        <INPUT TYPE=hidden name="as_sitesearch" value="http://www.gangleri.nl">
        </td></tr></TABLE>
        </FORM>
       ```
   
 * Lots of problems here.
    a) All XHTML tags must be lowercase. b) Same for attributes
   like “type” and “method”. c) All attributes must be in quotes. Like `method="
   GET"`. d) All tags must be well-formed. As in closed. As in when you have <input..,
   then you must end it with either a self-close like this /> or have a </input>
   to close it. Normally, since input, like img, doesn’t contain anything, you self
   close it. Like `<input whatever="whatever" />`.
 * 3. `<br>` has the same problem, it’s not closed. Use `<br />` instead.
 * Fix those and that will solve most of your problems.
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680153)
 * Thanks for the info. I just thought about the possibility that the “pipe” would
   be seen as code, can I replace it by the code for the image?
    ‘The Google problem’
   is an easy one too, thanks for the info. Also I didn’t know about the closing
   dash before I began to validate. What WP makes of it (`< />`) should better be
   replaced then?
 *  [WildBil2Me](https://wordpress.org/support/users/wildbil2me/)
 * (@wildbil2me)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680159)
 * All “Empty Elements” need to get closed in order for you to validate. That would
   be , <hr /> and image tags.
 * A proper image tag should look like this.
 * `<img src="" alt="" />`
 * You can add a handful of other attributes but you absolutely need the src, the
   alt and the closing “/” preceded by a blank space.
 * It took me awhile to get used to but once you do it’s not so bad.
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680164)
 * Otto, about the pipes. Now that I can try it with Frontpage, I noticed that it
   is actually just a sign on the keyboard and it has no code such as `>` for >.
   I like the pipe as division between the links on my blogroll (Firefox puts one
   between every link, IE only between the pages and the blogroll. Is there a way
   to use it without getting an error from W3?
    Btw, if an `.... />` is a better
   ending, why does 2.3.2 generate automatic `< />`s? Because it ‘knows’ that a 
   tag needs to be closed, but not which one? In any case, especially with the hits
   on the Google code, I can clean up most of the mess, but that’ll be a job for
   tomorrow. Thank you all.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680173)
 * I think you’re missing the point with the pipes. The pipe itself is not the problem.
   It’s the fact that you have anything at all there.
 * That list is an unordered list (aka `<ul>`). Unordered lists can ONLY contain
   list items (aka `<li>`). Anything inside the UL which is not also inside an LI
   is invalid. The pipe is outside the LI. That’s the problem. You can have anything
   you want there, but put it inside the LI. Nothing can be inside the UL without
   also being inside the LI. See?
 * Also, nobody understands what the heck you’re talking about with “automatic </
   >”. An empty tag is not valid, and WordPress doesn’t generate any such thing.
   Please explain what you’re talking about.
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680201)
 * > Also, nobody understands what the heck you’re talking about with “automatic
   > < />”. An empty tag is not valid, and WordPress doesn’t generate any such thing.
   > Please explain what you’re talking about.
 * What I refer to is this:
 * > `<a href="http://www.amazon.com/Myth-Fiction-Saga-Hadingus/dp/0226169723/ref
   > =sr_1_6/002-4606451-2919259?ie=UTF8&s=books&qid=1194507870&sr=1-6" target="
   > _blank" alt="From Myth To Fiction"><img src="/bookreviews/afbeeldingen/dumezil_hadingus.
   > jpg" align="right"></a>< /><font size="1">du mythe au roman: la saga de Hadingus
   > et autres essais (1970)</font>`
 * Do you notice the `...align="right></a>< />`?`<...align="right"/>` would have
   been more logical.
 * But since I have several WP installations which I not all started to validate
   yet, I have checked another, but what I describe above does not seem structural,
   so I no longer know for sure that it wasn’t me trying a few things out (but I
   can’t imagine that I thought of it myself). Also I am not sure anymore in what
   WP I wrote what post, so let’s just say that it was myself for the moment untill
   I find out otherwise (which I probably won’t).
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680202)
 * Great, on one WP installation I’m back to [two errors](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gangleri.nl%2Ffilmreviews%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&verbose=1).
   They are about the same widget, the dropdown of the standard category widget 
   I think. Anything I can do here?
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680205)
 * Right, I finished validating my five WP installations. A few remarks and leftover
   questions.
    [Articles section](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gangleri.nl%2Farticles&charset=%28detect+automatically%29&doctype=Inline&group=0&verbose=1).“
   end tag for element “p” which is not open.” in “(Prose Edda verse 45)` `” I don’t
   use that ` `myself. This is the line in my editor:`<font size=”1″>(_Prose Edda_
   verse 45)</font>`. The source does have the` `, but I don't know where it comes
   from. Before the line there is an image and the opening of the` `so nothing that
   requires a`<p>`.
 * -damn, the forum messes up my text with code, the line ends with a p-ending and
   a blockquote-ending and I don’t use the p myself-
 * The same line also gives some parsing errors.
 * At the bottom there are two parsing errors that appear to be from the ‘general
   makeup’, for example `</body>` tag.
 * [Bookreviews](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gangleri.nl%2Fbookreviews&charset=%28detect+automatically%29&doctype=Inline&group=0&verbose=1):“
   Line 167, Column 33: character “;” not allowed in attribute specification list”:“`
   <p style="text-align:center";><font size="2">Gli Uomini e le Rovine (1953/`“
   
   This is the “center” command that [Otto suggested](http://wordpress.org/support/topic/132087?replies=6),
   but W3 doesn’t like it.
 * For the rest, W3 doesn’t like my links to bookshops (Amazon and Bol) and every
   link is an error. Nothing much I can do about that, or…?
    The end has some parsing
   errors that I can’t figure out.
 * The music reviews section misses a lot of `alt` tags, but I know that for the
   future.
 * Something that comes back in every (but one) installation is the only mistake
   left in [filmreviews](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gangleri.nl%2Ffilmreviews%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&verbose=1).
   This appears to be something in the standard category widget in which I use the
   dropdown function.
 * Most things have become clear with your help, here are the final ‘dots on the
   i’ as we say it.
 * Oh, and the thing that I started all this for, isn’t solved. There is a strange,
   white line (much like a break) between the title and the content of my search
   widget and a text widget that I made into a Google search widget. It appears 
   in IE and Browzar, but not in Firefox. It’s quite ugly so I would like to be 
   able to remove it, but I don’t know where to start (stylesheet?).
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680209)
 * > _Bookreviews: “Line 167, Column 33: character “;” not allowed in attribute 
   > specification list” : “<p style=”text-align:center”;><font size=”2″>Gli Uomini
   > e le Rovine (1953/”
   >  This is the “center” command that Otto suggested, but 
   > W3 doesn’t like it.
 * You’re doing it wrong. The semi-colon should be inside the quote marks, not outside
   them.
 * Other errors:
 * `<script lang='javascript'>` is invalid. That should be
    `<script type='text/
   javascript'>`.
 * Whenever you have an `&` on your page, even in a URL, it must be `&amp;` instead.
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680210)
 * Damn, I really have to learn to read, I even managed to mess up Otto’s code. 
   I guess this will also solve another problem, because I just noticed that WP 
   changes `<div align="center">` to ‘<p align=”center”>` and that doesn’t work.[
   edit: [problem solved](http://wordpress.org/support/topic/132087?replies=8)]
 * I’ll have to see about that Java error, since (like I said) this comes from a
   widget that is built in WP and I wouldn’t know where to edit it.
 * Hmmmm, so I have to change all my Amazon links manually…..?
 * Thank you for the tips though.
 *  Thread Starter [Roy](https://wordpress.org/support/users/gangleri/)
 * (@gangleri)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/#post-680214)
 * [A few last things](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.gangleri.nl%2Farticles&charset=%28detect+automatically%29&doctype=Inline&group=0).
   
   I don’t understand errors about the `<p>`s that I didn’t put there myself and
   the two errors on the bottom are still a mystery to me too.

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/site-validation-help/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/site-validation-help/page/2/?output_format=md)

The topic ‘Site validation help’ is closed to new replies.

## Tags

 * [validate](https://wordpress.org/support/topic-tag/validate/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 21 replies
 * 4 participants
 * Last reply from: [Roy](https://wordpress.org/support/users/gangleri/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/site-validation-help/page/2/#post-680241)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
