body margin: 0; padding: 1.5em; border: 50px #666 ridge;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
body {
margin: 0;
padding: 1.5em;
border: 50px #666 ridge;
}
</style>
</head>
<body>
<h2>Lorem ipsum dolor sit amet</h2>
<p>Consectetuer adipiscing elit. Vivamus purus enim, sollicitudin vitae, tincidunt sit amet, pretium vel, libero. Sed sed nisi. Morbi gravida, odio at aliquam lobortis, urna massa vehicula mi, et posuere tortor elit eget est. Nulla ligula. Etiam pulvinar. Quisque ante quam, ultricies quis, rutrum dignissim, fermentum a, est. Nulla felis dolor, tempor non, posuere ut, ornare ac, eros. Cras in metus. Sed rutrum lectus ut nibh. Pellentesque ipsum.</p>
<h2>Nulla cursus semper metus</h2>
<p>Pellentesque lacinia felis vitae nulla. Sed leo. Sed euismod cursus diam. Maecenas sodales quam ac pede. Fusce mi massa, bibendum eget, congue sit amet, mattis eget, quam. Integer auctor lectus vel nunc. In dapibus, felis sed fringilla varius, tellus odio blandit metus, id sollicitudin lacus quam et erat. Phasellus varius euismod nisi. Donec consequat enim sit amet magna. Nullam dictum metus quis ipsum.</p>
<h2>Nam enim</h2>
<p>Fusce id pede ut leo malesuada nonummy. Nulla sem massa, fermentum quis, rutrum ac, nonummy sit amet, purus. Sed eu odio. Fusce ut diam. Integer volutpat tincidunt justo. Praesent in pede nec odio hendrerit vulputate. Quisque eleifend, nulla sit amet euismod lobortis, nulla turpis convallis tellus, eget blandit ligula justo suscipit sapien. Cras sed lectus. Mauris sed nibh.</p>
<h2>Vestibulum sodales dui eu erat</h2>
<p>Donec tempus, diam vel suscipit mollis, magna sem nonummy nisi, a blandit elit lectus vitae dolor. Donec condimentum. Curabitur congue, eros eget porttitor scelerisque, lacus justo nonummy lorem, nec interdum turpis nisi eu enim. Etiam tempor laoreet est. Nullam euismod velit nec felis. Nulla dictum dictum diam. Pellentesque metus sapien, gravida sed, auctor accumsan, placerat molestie, pede. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum fringilla felis posuere diam adipiscing venenatis. Vestibulum leo elit, facilisis faucibus, faucibus eu, tristique dictum, quam. Vivamus id dolor. Nullam adipiscing tortor ac risus. Aliquam magna. Pellentesque id ipsum. Vestibulum placerat risus vitae purus. Aenean augue nisl, convallis sit amet, viverra ac, dapibus ut, leo. Donec pede lectus, porta in, fringilla eu, ornare nec, mauris. Morbi vitae diam. Vestibulum sit amet diam consectetuer purus vestibulum iaculis.</p>
</body>
</html>
Related examples in the same category
1. | 'body' defines where to display all text, graphics, and other web page content | | |
2. | Single paragraph in body | | |
3. | Set font size for body | | |
4. | Set margin for body to '10% 10% 20% 10%' | | |
5. | Set font family for body | | |
6. | Set body background image and no repeat | | |
7. | Set repeat to repeat-x for | | |
8. | Set background image to no-repeat, and background-position to 75px 150px | | |
9. | Set body margin to 10% | | |
10. | Body margin | | |
11. | Set body font: 76% arial,sans-serif | | |
12. | body background-repeat: no-repeat | | |
13. | body font: 14px sans-serif; | | |
14. | body color: darkslateblue; | | |
15. | body border: 5px dashed darkslateblue; | | |
16. | body margin: 10px; | | |
17. | body padding: 10px; | | |
18. | body text-align: center; | | |
19. | body margin: 0; | | |
20. | body padding: 0; | | |
21. | body font: 73% arial, verdana, tahoma, "Trebuchet MS", sans-serif; | | |
22. | body line-height: 1.7em; | | |
23. | body color: #333; | | |
24. | body background: #fff; | | |
25. | Body text-align: left; | | |
26. | Body background: #858563 url(img/bgd.png) repeat-y top center; | | |
27. | body font: 75% "Trebuchet MS", verdana, arial, tahoma, sans-serif; | | |
28. | body line-height: 1.8em; | | |
29. | body color: #666; | | |
30. | body background: #E16027 url(img/bg.jpg) repeat-y top center; | | |
31. | Background image for body | | |
32. | body margin-left: 15%; margin-right: 15%; | | |
33. | Set up the body | | |
34. | body white-space: pre; | | |
35. | width and height percentage for html and body no margin | | |
36. | ?Body margin: 0 auto; | | |
37. | Body background-color: #3E3E2D; | | |
38. | Body background-image: url('image-demo-2011/Page-BgGlare.png'); | | |
39. | Body background-repeat: repeat; | | |
40. | Body background-attachment: scroll; | | |
41. | Body background-position: top left; | | |
42. | Body center | | |
43. | Body font-family: Arial, Helvetica, sans-serif; | | |
44. | Body font-size: 13px; | | |
45. | Narrow body | | |
46. | body font: 1em sans-serif; | | |
47. | background-attachment positions the background image relative to the body and forces the background image to remain fixed in place when the document is scrolled. | | |
48. | body background properties | | |
49. | 'link' sets the color of all links in an HTML document | | |
50. | 'vlink' sets the link color that have already been visited | | |
51. | 'bgproperties' sets the scroll properties of the background image | | |
52. | 'bottommargin' sets the height in pixels of the page bottom margin | | |
53. | 'leftmargin' sets the left indented distance in pixels | | |
54. | 'rightmargin' sets the right margin in pixels | | |
55. | 'topmargin' sets top margin in pixels | | |