Tue, 2015-09-29 15:29
Well my question title says it all and is that correct to do ?
I am not talk 100% simantically , you always can't be 100% semantic i understand , but is code like the below correct :
<figure class="services-figure"> <span class="services-icon accident"> </span> <figcaption> <h4>Accident-Trauma Center</h4> <p>Joint replacement came to stay in the 60s and 70s and it is now a common operation. It is safe, effective ...</p> </figcaption> </figure>
or is it absolutly wrong ?
Tue, 2015-09-29 21:48
#1
Quote: you always can't be
you always can't be 100% semantic
Why not? And if not, you'd best have compelling reason to screw it up.
Where is the figure you're captioning? The bg image in the span? Wrong. A bg image is decoration, not content.
<figure class="services-figure"> <img src="some.jpg" alt="short description of the image"> <figcaption> Accident-Trauma Center </figcaption> <p>Joint replacement came to stay in the 60s and 70s and it is now a common operation. It safe, effective … </p> </figure>
See the figure and figcaption elements.
It can be argued that the img element should be wrapped in a p element. I think that is the more structurally sound method.
cheers,
gary