CSS outline
In this lesson, we will learn how to apply outline to an HTML element using CSS outline properties.
CSS outline Property
The CSS outline property is used to draw a line around elements, providing visual emphasis or indicating focus. They provide a clear indication of the currently focused element, improving navigation for users who rely on keyboard or screen readers.
It is a short hand property that can be used to set the style, width and color of an outline.
Let's create a text box and button with a red outline to highlight it when clicked:
Unlock This Lesson & Start Learning!
Get full access to this lesson, practical exercises, quizzes, and your Mentora AI Tutor.
Special Offer, use coupon code DWL6BC to get additional discount of 10% on all subscription. Hurry limited time offer.
1 Month
Renews at ₹259/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
3 Months
Equivalent to ₹219.67/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
6 Months
Equivalent to ₹193.17/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
12 Months
Equivalent to ₹179.92/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor