লিংক স্টাইল করার জন্য অ্যাঙ্কর (<a>) এলিমেন্টের পসিউডো-ক্লাসগুলো ব্যবহার করা হয়। সঠিক ক্রম মেনে চলা জরুরি (LVHA অর্ডার):
a:link — অনভিজিটেড লিংক a:visited — ভিজিটেড লিংক a:hover — মাউস হোভার স্টেট a:active — ক্লিক করার মুহূর্ত (অ্যাক্টিভ স্টেট)
উদাহরণ ১: রঙ ও আন্ডারলাইন পরিবর্তন
<!DOCTYPE html>
<html>
<head>
<style>
a:link { color: orange; text-decoration: underline; }
a:hover { color: red; text-decoration: underline; }
a:active { color: green; text-decoration: underline; }
</style>
</head>
<body>
<h1>Tutorials</h1>
<p><a href="https://www.tutorialspoint.com/java">Java</a></p>
<p><a href="https://www.tutorialspoint.com/chsharp">C#</a></p>
<p><a href="https://www.tutorialspoint.com/jquery">jQuery</a></p>
<p><a href="https://www.tutorialspoint.com/ruby">Ruby</a></p>
<p><a href="https://www.tutorialspoint.com/pytorch">PyTorch</a></p>
</body>
</html>
উদাহরণ ২: সব স্টেটে একই স্টাইল (আন্ডারলাইন বাদ)
<!DOCTYPE html>
<html>
<head>
<style>
a:link, a:hover, a:active { color: blue; text-decoration: none; }
</style>
</head>
<body>
<h1>Demo Heading</h1>
<div><p>This is the <a href="https://tutorialspoint.com">reference</a></p></div>
</body>
</html>
সেরা অনুশীলন: সবসময় LVHA ক্রম মেনে লিখুন, অন্যথায় স্পেসিফিসিটি সমস্যা হতে পারে।