CSS - CSS Outline Width
Learn css - css tutorial - CSS Outline Width - css examples - css programs
Outline Width - Definition and Usage
- The outline width property is used to apply the width of the outline of an element.
- Line that is drawn around elements, outside the border edge.
- CSS outline is a border around the border.
- Outlines are different when compared to borders in following ways.
- Outline is always the same on all sides.
- We cannot specify different values for every sides of an element.
Outline Property :
- There are three different types of properties in CSS outline they are:
Outline Width :
- The outline width property determines the width of the outline to be added to the container. Its value should be in length (px, pt etc.,) or one of the qualities like thin, medium, or thick.
html sample code - css in html
Code Explanation - stylesheet css
- Applying the outline width property for <p> tag stating that the width of the outline around the <p> contents is thin.
- Similarly, we are applying outline width : thick for a <p> element which will have an outline around its text that looks thicker and stronger than the first outline.
- Here we also directly fix the outline width property value using measurement units like px, pt and % etc.
Note : Using Inline CSS we are applying a specific styles to a particular element.
Code Output - online css course
- Here, the paragraph text Welcome To wikitechy.com will have a thin outline around it which is displayed in the browser window.
- The Paragraph Where You Can Learn All the Technologies will have a thick outline width since we specified outline-width: thick in CSS.
- Similarly, outline around the text Best E-Learning Website in the World. is specified in 3px (pixels) as shown in the output.