A - kotwica (odnośnik)

Polecenie definiuje kotwicę.

(A - anchor)

Przykład:

<a href="http://www.cba.pl">Hosting CBA.pl</a>

Hosting CBA.pl

Atrybuty kotwicy:

Znacznik zamykający: wymagany

Wyświetlanie: liniowe

Może być zawarty wewnątrz innych elementów: 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, rb, rt, samp, small, span, strong, sub, sup, td, th, tt, var

Może zawierać w swoim obrębie inne elementy: abbr, acronym, b, bdo, big, br, button, cite, code, del, dfn, em, i, img, input, ins, kbd, label, map, noscript, object, q, ruby, samp, script, select, small, span, strong, sub, sup, textarea, tt, var

Odnośnik w praktyce

Odwiedzamy portal ABC

a.hej {
text-decoration: none;
position: relative;
color: #3366FF;
}
a.hej:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0%;
border-bottom: 2px solid #3366FF;
transition: 0.4s;
}
a.hej:hover:after {
width: 100%;
}


Porównawcza tabela znaczników HTML/XHTML