Css:- first letter

    The first-letter selector is used to add a style to the first letter of the specified selector.
    only first-letter selector can be used with block-level elements.

Code:-


<!DOCTYPE html> 
<html> 
 
<head> 
 <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
 <style> 
  div::first-letter { 
   font-size: 40px; 
  } 
 </style> 
 
</head> 
 
<body> 
 <div> 
  This div example is indicate the "first-letter" style. This will only apply for the first letter. 
 </div> 
 
</body> 
 
</html>



Output:- This div example is indicate the "first-letter" style. This will only apply for the first letter.
Css:- first letter Css:- first letter Reviewed by Network security on May 12, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.