Observe the very first letter
of the first paragraph in
the image of a news report
provided below.
The CSS property initial-letter
allows us to apply similar style
to the first letter of any HTML
element.
Syntax:
We need to apply the
::first-letter
pseudo-element
for initial-letter
property
to work correctly.
The initial-letter
property
accepts two numeric values separated
by a space.
value-1
determines the size of
the first letter,
specified in terms of how many
lines it occupies.
value-2
helps us control the
vertical alignment of the first
letter.
Let us have a look at an example:
In the above code, we have defined
the first letter L to have a size
of 3. This makes the letter
occupy 3 lines.
The second value defined is 2.
As we can see the letter is dropped
2 lines below the current line of
text.
Note:
This property is currently supported
in Chrome, Safari, Opera and other browsers
and not currently supported in Firefox browser.