there I have the following element:
<h1> Welcome in our flat. </h1>
And I would like to modify it with CSS so that what it gonna be displayed will be:
Welcome to OUR flat.
So, I wanna capitalize the word OUR. Does anyone know how I can do that?
there I have the following element:
<h1> Welcome in our flat. </h1>
And I would like to modify it with CSS so that what it gonna be displayed will be:
Welcome to OUR flat.
So, I wanna capitalize the word OUR. Does anyone know how I can do that?
It seems unnecessary to use CSS for this when changing it by hand would work just as well, but if you really want to use CSS, something like this would do it:
<p> Welcome to <span class="upcase">our</span> flat. </p>
.upcase {
text-transform: uppercase;
}
Just capitalize the word. No need for CSS
<h1> Welcome to OUR flat. </h1>
Without changing the markup (like putting a span around the word "our"), you'll need to use javascript. If you can change the markup, just change it to your desired capitalization.
Here's one way to do it with javascript. Without knowing more about your environment and requirements (like how do you know the word "our" is the one you want to change), I can't say if this is the best solution, but maybe it will get you started.
const h1 = document.querySelectorAll('h1')[0];
h1.innerText = h1.innerText.replace('our','OUR');
<h1> Welcome in our flat. </h1>