initial-letter-align
Quick Summary for initial-letter-align
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Code Usage for initial-letter-align
/* Keyword values */ initial-letter-align: auto; initial-letter-align: alphabetic; initial-letter-align: hanging; initial-letter-align: ideographic;  /* Global values */ initial-letter-align: inherit; initial-letter-align: initial; initial-letter-align: revert; initial-letter-align: unset; 
More Details for initial-letter-align

initial-letter-align

Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.

The initial-letter-align CSS property specifies the alignment of initial letters within a paragraph.

/* Keyword values */ initial-letter-align: auto; initial-letter-align: alphabetic; initial-letter-align: hanging; initial-letter-align: ideographic;  /* Global values */ initial-letter-align: inherit; initial-letter-align: initial; initial-letter-align: revert; initial-letter-align: unset; 

Syntax

One of the keyword values listed below.

Values

auto

The user agent selects the value which corresponds to the language of the text. Western languages would default to alphabetic, CJK languages to ideographic, and some Indic languages to hanging.

alphabetic

As described above, the cap height of the initial letter aligns with the cap height of the first line of text. The baseline of the initial letter aligns with the baseline of the Nth text baseline.

hanging

The hanging baseline of the initial letter aligns with the hanging baseline of the first line of text.

ideographic

The initial letter is centered in the N-line area.

Formal definition

Initial valueauto
Applies to::first-letter pseudo-elements and inline-level first child of a block container
Inheritedno
Computed valueas specified
Animation typediscrete

Formal syntax

[ auto | alphabetic | hanging | ideographic ]

Examples

Aligning initial letter

HTML
<p class="auto ">Initial letter - auto</p> <p class="alphabetic">Initial letter - alphabetic</p> <p class="hanging">Initial letter - hanging</p> <p class="ideographic">Initial letter - ideographic</p> 
CSS
.auto::first-letter {   -webkit-initial-letter-align: auto;   initial-letter-align: auto; }  .alphabetic::first-letter {   -webkit-initial-letter-align: alphabetic;   initial-letter-align: alphabetic; }  .hanging::first-letter {   -webkit-initial-letter-align: hanging;   initial-letter-align: hanging; }  .ideographic::first-letter {   -webkit-initial-letter-align: ideographic;   initial-letter-align: ideographic; } 
Result

Specifications

Specification
CSS Inline Layout Module Level 3 # aligning-initial-letter
initial-letter Drop caps in CSS

Last modified: Jan 19, 2022, by MDN contributors

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote


Me
Random CSS Property

font-size-adjust

The font-size-adjust CSS property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters).
font-size-adjust css reference