
Is there a way to put text on a text like above in CSS or JS?

Is there a way to put text on a text like above in CSS or JS?
Use a parent of relative position and add text as absolute child elements:
.elements {
position: relative;
}
.outer-element, .inner-element {
font-size: 60px;
font-family: verdana;
font-weight: bold;
}
.outer-element {
color: blue;
}
.inner-element {
position: absolute;
left: 50px;
top: 35px;
color: yellow;
}
<div class="elements">
<div class="outer-element">GTA</div>
<div class="inner-element">ROLEPLAY</div>
</div>
Try this
<div style="position:absolute; top:0;left:0;">some text</div>
<div style="position:absolute; top:5;left:5;">some text</div>
<div style="position:absolute; top:10;left:10;">some text</div>
<br/>
<div style="position:absolute; top:110;left:100;">some text</div>
<div style="position:absolute; top:105;left:105;">some text</div>
<div style="position:absolute; top:100;left:110;">some text</div>
Yes you can add text in front of an image using CSS.
Check : https://www.w3schools.com/howto/howto_css_image_text.asp
.container {
position: relative;
text-align: center;
color: white;
}
.firstline {
position: absolute;
top: 8px;
left: 15px;
font-size: 50px;
font-weight: bold;
color: white;
}
.secondtline {
position: absolute;
top: 22px;
left: 40px;
font-size: 70px;
font-weight: bold;
color: orange;
}
<div class="container">
<img src="https://www.w3schools.com/howto/img_snow_wide.jpg" alt="Snow" style="width:100%;">
<div class="firstline">GTA</div>
<div class="secondtline">ROLEPLAY</div>
</div>