20.04.2013, 16:59
So I believe there is no more background tag in HTML? I now need to use CSS. How do I do that? I need to make a .css file as well or what?
<body background="URL of image">
Huh?
http://www.quackit.com/html/codes/ht...mage_codes.cfm also Код:
<body background="URL of image"> |
This is the old way of specifying a background image in HTML, and is now deprecated (outdated and not recommended) by the W3C. Instead of using this method, you should use the CSS method as described above. |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style type="text/css"> body { background-image:url(path/to/image.jpg); } </style> </head> <body> <!-- stuff --> </body> </html>
Huh?
http://www.quackit.com/html/codes/ht...mage_codes.cfm also Код:
<body background="URL of image"> |
Thanks, what exactly do I do to have it in a separate CSS file?
|
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!--BEGIN CSS, STYLE TAGS MEAN CSS!--> <style type="text/css"> /*YOUR CSS GOES HERE!*/ body { background-image: url(path); } </style> <!--END CSS--> </head> <body> <!--Your shit goes here--> </body> </html>
Thanks, what exactly do I do to have it in a separate CSS file?
|
<link rel="stylesheet" type="text/css" href="mystyle.css">