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.
<!DOCTYPE html> <html> <head> <title> How to Add Image in Text Background using HTML and CSS ? </title> </head> <body> <p>Bajarangi Soft</p> </body> </html>
<style> p { background-image: url(b2.jpg); background-repeat: repeat; -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-top: 200px; font-size: 120px; text-align: center; font-weight: bold; text-transform: uppercase; font-family: 'Steelfish Rg', 'helvetica neue', helvetica, arial, sans-serif; font-weight: 800; -webkit-font-smoothing: antialiased; } </style>
<!DOCTYPE html> <html> <head> <title> How to Add Image in Text Background using HTML and CSS ? </title> <style> p { background-image: url(b2.jpg); background-repeat: repeat; -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-top: 200px; font-size: 120px; text-align: center; font-weight: bold; text-transform: uppercase; font-family: 'Steelfish Rg', 'helvetica neue', helvetica, arial, sans-serif; font-weight: 800; -webkit-font-smoothing: antialiased; } </style> </head> <body> <p>BAJARANGI SOFT</p> </body> </html>