In the mobile version of www.davidclick.com i would like to just see the email address and tel number on the home page. In other words i want to display just the email and tel number and hide the rest when viewed on an Iphone for example.
Wouldn’t it be better to use a class=“nodisplay” rather than use the title attribute?
That class could possibly be applied to a common wrapper instead of numerous elements, if they are bunched together.
And not css related, but a tip for phone numbers. you can wrap the number in an <a href="tel:mynumber" title="Call Me">
Just like mailto in the email, it will allow mobile users to tap to call.
As @SamA74 said, use a class, not the title attribute here. The title text will display as a tooltip on hover, and will be read out by screen readers, which is not what you want here. (I’m also bemused as to why you’ve wrapped the entire content of each <p> in the address in a span. I may be missing something, but they look entirely superfluous to me.)
Hi technoBear, regarding …“Bemused…” I got the code from here: https://schema.org/address and when i need to change to microdata apparently thats the way you have to do it, maybe Ive got something mixed up
Hmm … it’s not very clear from that, but it looks as if they’re using <span>s to mark up sections of text placed directly within a <div>. You have your text broken down into sections using <p> tags, so I’d have thought you could add the itemprop directly to those.