This class accepts lots of value in tailwind CSS in which all the properties are covered as in class form. This class is used to control an element’s outline.
Outline Classes:
- outline-none: This class is used to hide the default browser outline on focused elements.
- outline-white: This class is used to add a white 2px dotted border around an element with a 2px offset.
- outline-black: This class is used to add a black 2px dotted border around an element with a 2px offset.
Syntax:
<element class="outline-{style}">...</element>
Example:
HTML
<!DOCTYPE html>
< html >
< head >
< link href =
rel = "stylesheet" >
</ head >
< body class = "text-center mx-4 space-y-2" >
< h1 class = "text-green-600 text-5xl font-bold" >
GeeksforGeeks
</ h1 >
< b >Tailwind CSS Outline Class</ b >
< div class="mx-6 bg-green-200 grid grid-rows-3
grid-flow-col text-justify p-4">
< input class="placeholder-gray-500 p-3 m-2 rounded-lg
border-2 border-green-400 bg-green-100
focus:outline-none"
placeholder = "Outline-none" >
< input class="placeholder-gray-500 p-3 m-2 rounded-lg
border-2 border-green-400 bg-green-100
focus:outline-white"
placeholder = "Outline-white" >
< input class="placeholder-gray-500 p-3 m-2 rounded-lg
border-2 border-green-400 bg-green-100
focus:outline-black"
placeholder = "Outline-black" >
</ div >
</ body >
</ html >
|
Output:

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
09 Dec, 2022
Like Article
Save Article