The Wayback Machine - https://web.archive.org/web/20211101104938/https://www.geeksforgeeks.org/how-to-remove-outline-around-text-input-boxes-in-chrome-using-css/
Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

How to remove outline around text input boxes in chrome using CSS?

  • Last Updated : 16 Oct, 2021

Generally in the case of Google Chrome Browser, when the input field gets focus then the blue outline occurred on the border of the Input fields. The Task can be done by using the CSS outline property.  

Example:  

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

html




<html>
<head> 
  <title>
        How to remove outline around text
    input boxes in chrome using CSS?
 
  </title>
<style>
textarea:focus{
        outline: none;
    }
     
</style>
  <body>
      <h2>
          GeeksFprGeeks
      </h2>
      <h2>
          How to remove outline around text
    input boxes in chrome using CSS?
 
      </h2><br>
      <h4><b> Before using the outline Property</b></h4>
             
          <input type="text">
          <h4><b>After using the Outline Property</b></h4>
    <textarea rows="4"></textarea>
  </body>
</head></html>

Output 

Supported Browsers are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
My Personal Notes arrow_drop_up
Recommended Articles
Page :