How Can We Define Styles?
How Can We Define Styles?
Introduction
Hello,
We explained it partially in our previous lesson. Now let's repeat.
Styles can be defined in 3 ways in CSS,
- Inline Style
- Between the <style> tags.
- Using an external CSS file
Inline Style
1. Inline Style
As we can understand from the name, it refers to the styles we define by passing the style attribute to each element as inline.
This usage is not preferred as it reduces the reusability of each style and its legibility is very low.
In the example below, the letter-spacing style has provided 15px spaces between each letter in the text.
<p style="letter-spacing:15px">
Inline Style
</p>