mercredi 17 septembre 2014

Why does anchor outside H2 tag work and not inside a H2 header tag


Vote count:

0




Why does anchor outside H2 tag work and not inside a H2 header tag?


This is the first part of my php slider, I would like to have W3C valid XHTML pages so I coded it like below..


The anchor link is not working if I do it the way that it's possible to validate by W3C validator.


I should do something like <h2><a class="" href="" taget="_blank">Valid!</a></h2> that is valid but not working... I use a CSS for an image background file in When I do the following all is working fine but it will never validate by W3C and the W3C Validation is important for this project.. The code below is my original code, it's working but not valid (H2 inside anchor should be anchor inside H2 tag - W3C )



<div class="slide-info">
<a title="<?php echo Slider_HeaderTitleText_echo($Eerste_Slider_Header_Title); ?>" href="<?php echo $Eerste_Slider_Header_URI; ?>" target="_blank"><h2 class="notext txt-eerste"><?php echo Slider_HeaderTitleText_echo($Eerste_Slider_Header_Title); ?></h2></a>
<p><?php echo Slider_HeaderMainText_echo($Eerste_Slider_Header_Main_Text); ?></p>
<span class="align-left"><a href="<?php echo $Eerste_Slider_Header_URI; ?>" class="purplesmallbutton">more</a></span>
</div>


What should I change to make the link work and XHTML Valid?



asked 1 min ago

jagb

31






Why does anchor outside H2 tag work and not inside a H2 header tag

Aucun commentaire:

Enregistrer un commentaire