• Resolved Roy

    (@gangleri)


    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 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=”https://www.xxx.nl/header.jpg” 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="https://www.xxx.nl/header.jpg" align="right" />

    And in the header.php like this:
    <img src="https://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="https://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=”https://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 6 replies - 16 through 21 (of 21 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    1st error:

    Your blockquote does not have a starting P tag. So the ending /P tag doesn’t make any sense there. Go edit that post and put a P tag around the stuff inside the blockquote.

    2nd error:
    <script type=’text/javascript’> like I said above.

    All the crap at the end is caused by the 1st error. Fix that and they should go away. One single error can cascade into multiple validation problems.

    Thread Starter Roy

    (@gangleri)

    Otto, I figured that much, but I didn’t put the `

    there! These are the first lines of the post:

    <img src=”/articles/afbeeldingen/thorshammer2.jpg” alt=”Thor’s hammer” align=”right” />

    All can understand how frightened the bonde became when he saw that Thórr let his brows sink down over his eyes. When he saw his eyes he thought he must fall down at the sight of them alone.
    <font size=”1″>(Prose Edda verse 45)</font>

    `
    I think I made a combination of img, a href and blockquote that WP doesn’t like, but in my eyes, there is nothing wrong with anything above there. WP thinks to see a p tag somewhere and closes it.

    [edit] I’m home now so I decided to try to find that Java command, but I can’t find it. It occurs in the categories widget. I have opened every category file that I could find, but none has the Java typo. Any hints where I can look?

    [edit 2] I have found the Java mistake. It is in the wp-includes folder and called widgets.php (a core file that comes with the download!). I changed it, the dropdown still works and W3 is happy. Now one fault left.

    Thread Starter Roy

    (@gangleri)

    Does anyone have a clue about those weird p-closings that WP adds to two of my posts? They seem to come from an html combination that I type in the post of img, blockquote and font size.

    [edit] I’ve been playing around a little. When I remove the blockquote tags, the errors are gone. When I remove the font tag, they’re still there. When I remove the blockquotes and make new ones with the editor, the errors come back. This is weird, because in the same article there is another quote that does not give errors, but still the opening quote gives errors even when all other coding is removed…

    Are you working in the WYSIWYG editor or in the code one?

    Using just the code editor try fixing the blockquote situation and see what happens.

    Thread Starter Roy

    (@gangleri)

    I don’t use the visual editor in most cases. In this case, I got rid off the blockquote and the error was gone. When I put them back, the error is back (also if I use the “b-quote” button. When I delete the font tag and use the blockquote, there is an error (while furtheron in the post this is not the case). I just think of it that I haven’t tried removing the image and leave the blockquote, but in any case, it seems that the blockquote tag makes WP ‘see’ an opening ‘p’ somewhere.

    Thread Starter Roy

    (@gangleri)

    Well, I found it, but I don’t understand it.
    The site is valid when I change a little thing. I had img tag, an enter, blockquote, plain text, font, plain text, end font, end blockquote.
    When I remove the enter, my site suddenly becomes valid, but the first text also is suddenly is font size 1.
    In the end I decided to move the image to a normal piece of text (out of the quote) and the other one too (it was also in a quote) and all errors are solved.

    (Also, I never noticed that a blockquote also deminishes the right margin, so an image align=right gets another position in the text as an image in a quote. Logical of course.)

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Site validation help’ is closed to new replies.