HTML: Includeți imaginea de fundal - cum funcționează
Fundalul unei pagini HTML nu trebuie să fie monocrom. Vă puteți integra propriile imagini de fundal și face site-ul dvs. web grafic mai individual.
Includeți imaginea de fundal folosind atributul „stil”
Puteți include, de asemenea, o imagine de fundal în HTML fără a utiliza CSS.
- Dați-i atributului corpului paginii dvs. HTML un atribut.
- Anume un atribut „stil”.
- Arată astfel: „„.
- În acest caz, fișierul "mein background.webp" ar trebui să fie în același dosar ca fișierul dvs. HTML.
Învechit: atributul „fundal”
Puteți utiliza în continuare atributul „fundal”. Dar nu este un stil bun, ca să spunem așa, este „învechit”.
- Odată ce designul nu a fost izolat de conținut.
- De exemplu, aici a fost folosit următorul cod: "".
Atributul „stil” se referă la ideea foii de stil, separarea aspectului și conținutului. Puteți realiza o programare HTML și mai elegantă dacă separați cu adevărat designul și aspectul de conținut. Puteți face acest lucru folosind CSS. Într-un alt sfat practic, vom explica diferențele dintre HTML și CSS.