Bootstrap allows us to replace the text with background image for any text element like paragraph element, heading element etc. With the use of .text-hide class, we can replace an element’s content with a background image.
<element class = "text-hide" style = "background-image: url('Specify URL of image here');"> </element>
In the above syntax, the text-hide class is used to first hide the text of the element and a background image is added to the element using the CSS background-image property.
Note: This class also helps in improving the SEO of a website, as using this class we can add images to the website using heading tags, and use of heading tags is found to be good for a Webpage’s SEO.
- Include Bootstrap in AngularJS using ng-bootstrap
- Difference between bootstrap.css and bootstrap-theme.css
- Difference Between Bootstrap 3 and Bootstrap 4
- Difference between Bootstrap 4 and Bootstrap 5
- How to create responsive image gallery using HTML, CSS, jQuery and Bootstrap?
- How to add image before optgroup label using Bootstrap ?
- How to set div with left image and button at bottom using bootstrap?
- How to fit the image into modal popup using Bootstrap?
- How to add a black hover to an image using bootstrap?
- How to place the image above the slider in mobile view in bootstrap?
- Why card images use data-src (not src) for image in Bootstrap 4 ?
- Convert an image into grayscale image using HTML/CSS
- ReactJS | Hot Module Replacement
- Advantages and Disadvantages of various Page Replacement algorithms
- Bootstrap | figure class with Examples
- How to add active class on click event in custom list group in Bootstrap 4 ?
- How to use links on card-img-overlay class in Bootstrap 4 ?
- How to Set navbar active class with Bootstrap and AngularJS ?
- How to use grid-breakpoint class in Bootstrap ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.