Kategorien
Web Publishing

Telefon Links in HTML

Mit Smartphone klickbare Telefon-Links in HTML.

HTML Telefon Links für Smartphones bzw. gewisse Browser

Beim Besuch via Smartphone aktiviert der Link  “Karl-Rüdiger: 079 333 88 22” per Klick (bzw. Fingertipp) die Telefonfunktion und ruft an.

Link-HTML:

<a href="tel:+41793338822">079 333 88 22</a>

CSS3 tel-Link ändern :

a[href^="tel"]:link,
a[href^="tel"]:visited, 
a[href^="tel"]:hover {
    text-decoration:none;    
    cursor:default;
    color:#color;
}

Zusätzlich für Smartphones:

@media only screen and (max-device-width:480px) {
  a[href^="tel"]:link,
  a[href^="tel"]:visited,
  a[href^="tel"]:hover {
      text-decoration:underline;
      cursor:pointer; 
      color:#color;
   }
}

Mit der Meta-Angabe:

 «meta name="format-detection" content="telephone=no" /»

sollte verhindert werden, dass so formatierte Links auf Smartphones automatisch anklickbar sind.

Von Andy

Dipl. Web Publisher EB-Zürich