1

I want first letter of all words to be little bigger than rest

<style>
h1 {
    color: #1c1c1d;
    font-family: 'Raleway',sans-serif;
    font-size: 27px;
    font-weight: normal;
    margin: -2px 0px 0px;
    text-align: center;
    display:inline;
    text-shadow: 1px 1px 2px #082b34;
}
h1::first-letter {
    font-size: 125%;
}
</style>

<h1> WELCOME TO HOMEPAGE </h1>

But this only increasing the 'W' in WELCOME. If possible with use of <span>

mysqlrockstar
  • 2,536
  • 1
  • 19
  • 36

1 Answers1

3

first-letter works only for block elements so remove display:inline; and you are good to go.

h1 {
  color: #1c1c1d;
  font-family: 'Raleway', sans-serif;
  font-size: 27px;
  font-weight: normal;
  margin: -2px 0px 0px;
  text-align: center;
  display: inline-block;
  text-shadow: 1px 1px 2px #082b34;
}

span {
  display: inline-block;
}

span::first-letter {
  font-size: 200%;
  color: #eb632d;
}
<h1> <span>WELCOME</span> <span>TO</span> <span>HOMEPAGE</span> </h1>
Nilesh Naik
  • 751
  • 3
  • 9