code.progysm.com

Balise XHTML a

Descriptions

Description:
lien hypertexte ou référence
Position (relative)
à l'intérieur de la balise <body>

Attributs

  id          ID             #IMPLIED
  class       CDATA          #IMPLIED
  style       %StyleSheet;   #IMPLIED
  title       %Text;         #IMPLIED
  lang        %LanguageCode; #IMPLIED
  xml:lang    %LanguageCode; #IMPLIED
  dir         (ltr|rtl)      #IMPLIED
  onclick     %Script;       #IMPLIED
  ondblclick  %Script;       #IMPLIED
  onmousedown %Script;       #IMPLIED
  onmouseup   %Script;       #IMPLIED
  onmouseover %Script;       #IMPLIED
  onmousemove %Script;       #IMPLIED
  onmouseout  %Script;       #IMPLIED
  onkeypress  %Script;       #IMPLIED
  onkeydown   %Script;       #IMPLIED
  onkeyup     %Script;       #IMPLIED

  charset     %Charset;      #IMPLIED
  type        %ContentType;  #IMPLIED
  name        NMTOKEN        #IMPLIED
  // peut être appelé de cette façon <a href="#namevalue"></a>
  href        %URI;          #IMPLIED
  hreflang    %LanguageCode; #IMPLIED
  rel         %LinkTypes;    #IMPLIED
  rev         %LinkTypes;    #IMPLIED
  accesskey   %Character;    #IMPLIED
  shape       %Shape;        "rect"
  coords      %Coords;       #IMPLIED
  tabindex    %Number;       #IMPLIED
  onfocus     %Script;       #IMPLIED
  onblur      %Script;       #IMPLIED


!! XHTML 1.0 Transitional seulement !!
  target      %FrameTarget;  #IMPLIED

CSS

a {
 color: inherit;
 background: transparent;
}
a:link {
 color: #0000EE; /* Firefox 0.8 */
 color: #0000FF; /* Konqueror 3.2.2 */
 text-decoration:underline; 
}
a:visited {
 color: #551A8B; /* Firefox 0.8 */
 color: #FF00FF; /* Konqueror 3.2.2 */
}
a:active {
 color: #EE0000; /* Firefox 0.8 */
 color: #FF0000; /* Konqueror 3.2.2 */
}

Exemple

<a href="http://yansanmo.no-ip.org:8080/">La page à Yan San Mo</a>

Imbrication XHTML 1.0 Strict

Peut être imbriquée à l'intérieur de:
abbr, acronym, address, b, bdo, big, caption, cite, code, dd, del, dfn, div, dt, em, fieldset, h1, h2, h3, h4, h5, h6, i, ins, kbd, label, legend, li, object, p, pre, q, samp, small, span, strong, sub, sup, td, th, tt, var
Peut imbriquer:
PCDATA, abbr, acronym, b, bdo, big, br, button, cite, code, del, dfn, em, i, img, input, ins, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var