នៅក្នុងភាសា HTML តំណរភ្ជាប់ទៅកាន់គេហទំព័រផ្សេងៗ ត្រូវធ្វើឡើងដោយផ្តល់តំលៃជាអាស័យដ្ឋាននៃគេហទំព័រណាមួយអោយទៅ attribute href របស់ a ដែលដើរតួនាទីយ៉ាងចំបងនៅក្នងុការធ្វើដំណរភ្ជាបទាំងឡាយ។ អាស្រ័យហេតុនេះ ការកែច្នៃរចនា element a ដោយប្រើប្រាស់ភាសា CSS ជារឿងដ៏សំរាប់មួយ នៅក្នុងការបង្កើតគេហទំព័រមានលក្ខណៈអាជីពទាំងឡាយ។ ជាក់ស្តេង យើងអាចរចនា element a ស្ថិតក្នុងសភាពផ្សេងៗ ដោយធ្វើដូចខាងក្រោមនេះ៖
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Styling Link</title>
<style>
/* unvisited link */
a:link {
color: red;
}
/* visited link */
a:visited {
color: green;
}
/* mouse over link */
a:hover {
color: hotpink;
}
/* selected link */
a:active {
color: blue;
}
</style>
</head>
<body>
Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.
Note: a:active MUST come after a:hover in the CSS definition in order to be effective.
</body>
</html>
Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.
Note: a:active MUST come after a:hover in the CSS definition in order to be effective.
នៅក្នុងការអនុវត្តជាក់ស្តែង គេនិយមធ្វើការកែច្នៃ element a អោយទៅជាប៊ូតុងចុចមួយបាន ដោយធ្វើដូចខាងក្រោមនេះ៖
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Styling Link</title>
<style>
a:link, a:visited {
background-color: #f44336;
color: white;
padding: 14px 25px;
text-align: center;
text-decoration: none;
}
a:hover, a:active {
background-color: red;
}
</style>
</head>
<body>
Link Button
A link styled as a button:
This is a link
</body>
</html>














