In this article, we will use HTML and CSS to set the image in the text background. To set the image in the text background, some CSS property is used.
HTML Code: HTML code is used to create a basic structure of the body. In the following code, we will use paragraph tag to write text content.
CSS Code: The CSS property is used to set the image as background in the text. The background-image property is used to set an image as background. The -webkit-text-fill-color property is used to give the text a transparent color, the background image will show through the text, thus completing the clipping effect.
Complete Code: In this section, we will combine the above two sections to add an image as text background.
- How to give text or an image transparent background using CSS?
- How to add filter to the background image using CSS ?
- How to Create a Wave Image for a Background using HTML and CSS ?
- How to create long shadow of text without using text-shadow in HTML and CSS ?
- How to wrap the text around an image using HTML and CSS ?
- How to place text on image using HTML and CSS?
- Text Animation with changing the color of the text using HTML & CSS
- How to add a Login Form to an Image using HTML and CSS ?
- How to stretch and scale background image using CSS?
- How to use text as background using CSS ?
- Set the size of background image using CSS ?
- JQuery | Setting background-image using CSS property
- How to Rotate Container Background Image using CSS ?
- Convert an image into grayscale image using HTML/CSS
- Set the opacity only to background color not on the text in CSS
- How to add shadow to text using CSS ?
- CSS | background-image Property
- CSS | Combine background image with gradient overlay
- How to create Skewed Background with hover effect using HTML and CSS?
- How to Create Gradient Background Animation using HTML and CSS ?
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.