skip to Main Content

As per the title, i am trying to change my from this “EXAMPLE TITLE” to this “ExaMple title”.

Please note that i am using two uppercase characters in the same sentence.
If that is not possible then can you recommend a css that would make it sentence case like this “Example title”

EDIT:I already have some suggested duplication of my post, but i am looking for a different thing. I have to use the tag for SEO purposes which forces the character to become uppercase so i need to have a lowercase css for a few of the characters not the whole sentence

2

Answers


  1. Ciao Angelo, I can’t help you with your first case “ExaMple title” but I’m pretty sure you can get “Example title” with the following code:

    HTML:

    <h1>EXAMPLE TITLE</h1>
    

    CSS:

    h1 { text-transform: lowercase; }
    h1:first-letter { text-transform: uppercase; }
    

    EDIT: You wrote that H1 tag forces your text to uppercase, this is not a standard behavior of that tag, this means that you have already a CSS rule like this:

    h1 { text-transform: uppercase; }
    

    Can’t you remove that line from your current CSS?

    Login or Signup to reply.
  2. you can do like this

    HTML :

    <h1>ExaMple title</h1>
    

    CSS :

    h1 {font-variant-caps: unicase;}
    

    This will result as the HTML input.

    ExaMple title

    I prefer this way usually when attach unique key such as token ID which have upper & lower case in mix order

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search