When making a layout, it is not always clear what is in front of us - a button or a link. Outwardly, these elements may be very similar, but their function is different and the browser reacts to them differently. Therefore, the wrong choice can lead to errors in the site.
Why the problem arises
โ . , , . - .
<a>
.
<a href="https://htmlacademy.ru">HTML Academy</a>
โ . : , , , . .
<button>
.
<button class="button">9 900 .</button>
, โ , โ .
,
URL- <>
, <button>
, , . .
โ Ctrl .
. URL-, <button>
, .
,
, , .
<a>
, , . ยซยป , , , .
<a href="javascript:;"> </a>
, javascript:;
/#
.
. .
, :hover
, :focus
, :active , :visited
.
:visited
, :disabled
.
. :visited
, :disabled
โ .
- ?
- , .
|
|
|
|
, . . . |
- โ , , , , . . |
|
. , , . |
. . |
,
ยซยป. , . , .
, VESELO
HTML Academy. , ยซ ยป , .