Title: Validation Problems
Last modified: August 18, 2016

---

# Validation Problems

 *  Resolved [moses08](https://wordpress.org/support/users/moses08/)
 * (@moses08)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/)
 * Hey all,
 * I’m trying to get my block to validate correctly at [http://validator.w3.org/](http://validator.w3.org/)
 * For reference, my blog URL is [http://www.nfldraftdirt.com](http://www.nfldraftdirt.com)
 * I’m looking at the errors that the validator is giving me and I know the solution
   but I can’t implement it.
 * The problem is that I’m opening an anchor tag before I close a strong tag. I 
   can’t figure out how to close the strong tag before opening the anchor tag because
   it is all done dynamically. Here is the code in question:
 * ` <div class="entrymeta">
    Posted <?php the_time('F j, Y '); $comments_img_link
   = <img src="' . get_stylesheet_directory_uri() . /images/comments.gif" title="
   comments" alt="*" /><strong>; comments_popup_link($comments_img_link .Comments(
   0)', $comments_img_link .' Comments(1)', $comments_img_link . ' Comments(%)');
   edit_post_link(__(' Edit'));?> </strong> </div>
 * Any suggestions? Also, if you know how to solve any of the other validation problems
   I would more then appreciate it.
 * Thanks a lot!

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [DianeV](https://wordpress.org/support/users/dianev/)
 * (@dianev)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494509)
 * In HTML (and XHTML), tags have to be nested (opened and close) in order of occurrence:
 * `INCORRECT:
    <strong><a href="whatever">some text</strong></a> CORRECT: <strong
   ><a href="whatever">some text</a></strong>
 * In your code above, you’re opening the strong tage after the image. Just open
   it where you really want the strong tag to start, and close it where it should
   logically close.
 *  Thread Starter [moses08](https://wordpress.org/support/users/moses08/)
 * (@moses08)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494598)
 * That’s what I figured out but I don’t know much about PHP so I’m having trouble
   implementing it.
 *  [jonimueller](https://wordpress.org/support/users/jonimueller/)
 * (@jonimueller)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494600)
 * That’s nothing to do with PHP, it’s HTML. But it’s a habit you must learn. Tags
   must be nested and not overlapping. And all tags must be closed. Tags that stand
   alone (IMG, BR, HR) must have a trailing slash.
 *  Thread Starter [moses08](https://wordpress.org/support/users/moses08/)
 * (@moses08)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494641)
 * I understand how to write XHTML compliant webpages but I can’t figure out how
   to close the strong tag before the anchor tag. The code looks like PHP to me.
   What exactly do I need to do to close the strong tag before the anchor tag begins?
 *  [Doodlebee](https://wordpress.org/support/users/doodlebee/)
 * (@doodlebee)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494660)
 * Is this code you wrote yourself? It’s very odd looking. Ahhh…I see, You’re trying
   to replace the regular text with an actual image link. Your problem is that you’re
   using the image itself to set the boldness of the text, Don’t do that. Do this:
 * ` <div class="entrymeta">
    Posted <?php the_time('F j, Y '); $comments_img_link
   = <img src="' . get_stylesheet_directory_uri() . /images/comments.gif" title="
   comments" alt="*" />; comments_popup_link($comments_img_link .Comments(0)', $
   comments_img_link .' Comments(1)', $comments_img_link . ' Comments(%)'); edit_post_link(
   __(' Edit'));?> </div>
 * Now, in your CSS, just put in:
 * div.entrymeta a {
    font-style:bold; }
 * The point of CSS is to avoid extra markup.
 *  [Doodlebee](https://wordpress.org/support/users/doodlebee/)
 * (@doodlebee)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494661)
 * …and by the way -fix that and *all* the errors go away – they’re all referencing
   this one issue.
 *  Thread Starter [moses08](https://wordpress.org/support/users/moses08/)
 * (@moses08)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494668)
 * Thanks a lot! One of my main issues was that I was editing the wrong file so 
   any changes I made weren’t even being reflected. I finally got it working. Thanks
   again!
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494686)
 * Maybe mark this as resolved then, thanks?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Validation Problems’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 5 participants
 * Last reply from: [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/validation-problems/#post-494686)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
