हम हाइपरलिंक्स के डिफॉल्ट व्यवहार को हटा सकते हैं जो एक्टिव या फोकस्ड होने पर अपने चारों ओर एक डॉटेड आउटलाइन दिखाते हैं, एक्टिव/फोकस्ड लिंक्स पर CSS outline प्रॉपर्टी को none घोषित करके।
समाधान
a, a:active, a:focus { outline: none; }
उदाहरण
आइए एक उदाहरण के साथ एक्टिव लिंक्स के चारों ओर डॉटेड लाइन हटाना देखें:
<!DOCTYPE html> <html> <head> <title>Remove dotted line around links using css</title> </head> <style> div { color: #000; padding:20px; background-image: linear-gradient(135deg, #dc3545 0%, #9599E2 100%); text-align: center; } a, a:active, a:focus { outline: none; } </style> <body> <div> <h1>HTML Links Demo</h1> <a href="https://google.com" target="_blank">Go To Google</a> </div> </body> </html>
आउटपुट
उपरोक्त कोड के लिए आउटपुट:
समाधान लागू करने से पहले:

समाधान लागू करने के बाद:
