Help - Search - Members - Calendar
Full Version: The body statement inside *.css versus the body inside the *.html
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
maxcamps
It is not very clear after read several tutorials , well 2 tutorials . How BODY works in css,
I see the BODY tag being used in the css external fila as well and in HTML files . could not fin help in this topic .
Please provide a resourse to clarify this.
nazariocampos@yahoo.com cancun mexico naz_campos@hotmail.com
pandy
It sounds like you misunderstand what CSS is. It doesn't replace HTML. It adds style to HTML.
It does that by using selectors that match already existing HTML structures. That may or may not include BODY. If you have a style rule like this

body { color: black; background: yellow }

that means that all text on the page should be black on a yellow background unless it's overridden by something else, for example style rules for headings.

Read the introductory chapters in the CSS rewference.
http://htmlhelp.com/reference/css/
factor
It does not matter where do you place your css code, external file or your html document, it has exactly the same effect. I always prefer using external css files so making changes are a lot more easier because you have to change only one file.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.