CSS Outline Color Property with Examples
ஃ Syntax
ஃ Why outline-color is important ?
ஃ Syntax
ஃ Why outline-color is important ?
ஃ structure diagram examples
ஃ CSS Outline Color Property Examples
ஃ CSS Outline Color Property Output
CSS Outline-color property use to set color of outline is drawn outside the border of HTML Element.
Syntax
Why outline-color is important ?
✔ Improves visibility of elements.
✔ Used for focus states (button,forms)
✔ Helps accessibility.
✔ Highlights elements without breaking layout.
ஃ structure diagram examples
CSS Outline Color Property
Examples
Explain Program
<!DOCTYPE html>
- This declare the document type.
- browser that the document is written in html
Step 2]
<html>.... . </html>
- html is the root element of the html page.
- Every thing inside it is part of the webpage.
Step 3]
- <head> section contains metadata and css styles,not visible content.
- Contains styles, metadata and page setting
<style> tag Internal CSS Section
CSS Outline Color Property with Examples
border :1px solid black;
- Add thin black border around the paragraph.
Padding: 5px;
- Add Space inside the border.
- border helps difference between border and outline
Solid Red Outline
- outline-style: solid; -> Draws a solid outline.
- outline-color red; -> Outline color is red.
- Outline appears outside the border.
Dotted Blue Outline
- dotted creates small dots.
- blue colored outline
- outset gives 3D raised effect
- green colored outline
- Browser automatically inverts background color
- Mainly used for accessibility and focus styles.
Step 5]
Step 6]
<body> section
- <h2> is heading Tag.
- <p> defines a paragraph Tag
Step 7]
- <p> create a paragraph
- Class = "ex1" ,Class = "ex2", Class = "ex3" , Class = "ex4"
- CSS rules written for .ex1
Step 8]
CSS Outline Color Property

No comments:
Post a Comment