Skip to content Skip to sidebar Skip to footer

Getting An Error In W3c Markup Validation When Trying To Get A Whole
Element As A Link In A Page

I am trying to get whole
element as a link so i wrote these line of code :-
i</div><h2 id="solution_1">Solution 1:

</h2><div class="answer-desc"><p>From <a rel="nofollow noreferrer noopener" href="https://www.w3.org/TR/html5/grouping-content.html#the-figcaption-element">the spec</a>:</p><blockquote><p>Contexts in which this element can be used:
As the first or last child of a figure element.</p></blockquote><p>You are trying to use it as a child element of an <code><a></code> not a <code><figure></code></p><a name=

Solution 2:

Better to do this:

<ahref="#"><figure><imgsrc="images/product-image.jpg"alt="image  " /><spanclass="label"><spanclass="rotate">40%</span></span><spanclass="curle-label_bg"></span><figcaption><spanclass="product-brand">Brand of product</span>
          Main Caption here 
         <spanclass="save-money">Save 395.05</span><spanclass="product-price">€169.30</span></figcaption></figure></a>

Now the figure is enclosed within the a tag, and the figcaption is a child of the figure, not the <a>

Post a Comment for "Getting An Error In W3c Markup Validation When Trying To Get A Whole
Element As A Link In A Page"