Html: image in background?
Hi, I need help with HTML (only HTML and not CSS).
I want to insert an image, but I don't want it to be in the text, but rather behind the text.
When it's in the text, everything shifts and there's a huge gap between the lines, which is exactly what I want to avoid.
Can anyone help me?
Hi,
what you would like to have with CSS only. At least when it comes to the HTML5 standard. If you want a background image for an element, parent element or for the whole page, you need the following CSS code:
For the whole body you can also use this:
You can also find further information about Adding Background Graphics in the Selfhtml wiki under: https://wiki.selfhtml.org/wiki/CSS/Tutorials/Hintergrund/Gestalungs_mit_CSS
or a tutorial for CSS under:
https://wiki.selfhtml.org/wiki/CSS/Tutorials/Einstieg
Success
You can set a background image by setting the “background” attribute of the body tag, such as:
Or do you just want to write a certain text on a picture?
The “background” Attribute is outdated, not part of the HTML5 specification and should not be used alone anymore. Therefore, as Mirko has already written correctly, background graphics should be integrated via CSS.
Thanks for the hint