QNimate

  • CoursesVideos
  • WP PremiumPlugins
  • DemosLab
  • Home
  • QIdea
  • QTrack
Home Carbon Ads Styling First Letter And Line Using CSS

Styling First Letter And Line Using CSS

drop-caps

First letter of any block level element can be styled using the ::first-letter selectors.

The following CSS properties can be used with the ::first-letter selector

  1. font
  2. color
  3. background
  4. margin
  5. padding
  6. border
  7. text-decoration
  8. vertical-align(float should be none)
  9. text-transform
  10. line-height
  11. clear
  12. float

First line of any block level element can be styled using the ::first-line selectors.

The following CSS properties can be used with the ::first-line selector.

  1. font properties
  2. color properties
  3. background properties
  4. word-spacing
  5. letter-spacing
  6. text-decoration
  7. vertical-align
  8. text-transform
  9. line-height
  10. clear

Remember that these selectors can only be applied to block level elements.

Jun 20, 2014Narayan Prusty
Changing Text Selection Color Using CSSHTML5 Form Placeholder Attribute

Leave a Reply Cancel reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

Narayan Prusty

I am a software engineer specialising in Blockchain, DevOps and Go/JavaScript. This is my personal blog where I write about things that I learn and feel interesting to share.

Image8 years ago Web Development
Share this
0
GooglePlus
0
Facebook
0
Twitter
0
Linkedin
Related Articles
  • CSS Specificity: Priortizing Selectors Rules
  • Making HTML Underlying Elements Clickable Using pointer-events CSS Property
  • Horizontal and vertical Centering Using CSS
  • CSS3 :before and :after Psuedo-Elements and Generated Content
  • JavaScript Change Console Log Color
Our Sponsor
My Books

2014 - 2015 © QNimate
All tutorials MIT license