CSS vs. HTML code

liunx

Guest
Well, as far as I understand, CSS gives you a bit more flexability in page design yet I get the general impression it is just HTML code..I also understand that not all browsers interpret CSS in the same way if at all.<br />
<br />
So what is really better and is there any CSS that is readable for most browsers?<br />
<br />
Secondly can CSS be "mimicked" by HTML to some degree as to be interpretted uniformally by current browsers?<!--content-->yet I get the general impression it is just HTML codeNot at all. It can be embedded in an HTML document, but it is a completely different language.I also understand that not all browsers interpret CSS in the same way if at allMany of the old browsers had trouble will CSS, but modern browsers can handle it just fine.So what is really betterHours of work is saved, better maintainability, and the HTML document and now be marked up purly structurally the way it was supposed to be.Secondly can CSS be "mimicked" by HTML to some degree as to be interpretted uniformally by current browsers?Some can't be mimicked. The parts that can would (1) take lots of extra coding and time, and (2) rely on browser tricks, which would hurt the uniformity of it.<!--content-->You're missing the point. Web pages aren't supposed to appear the same on every browser and CSS is there to make it easier to make pages that work no matter how they look or are rendered. This will make no sense whatsoever unless you 1) forget everything you think that you know about making a web page and 2) understand that CSS is only one of the two tools used. The whole technique is called separating content from presentation and the other tool is HTML 4.01 Strict. <br />
<br />
If you look at the HTML 4.01 Strict DTD (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/sgml/dtd.html">http://www.w3.org/TR/html4/sgml/dtd.html</a><!-- m -->) you will note that all the stuff relating to presentation has been removed. And if you read the 4.01 Specification (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/">http://www.w3.org/TR/html4/</a><!-- m -->) you will note that every mark up element has a meaning. The P element designates a paragraph, the CITE element a citation, the EM element emphasis. You are not supposed to use the BLOCKQUOTE element for indentation but only to designate a block quotation. And you are supposed to mark up all of your headings as H1 or H2 or such. This way, no matter how Ps or CITEs or EMs are rendered, the page will work. <br />
<br />
Web pages need to work on more than just MSIE and Netscape. There are increasing numbers of people with disabilities who are finding in the web a great opportunity to increase their access to the world. And some of them are using browsers that don't have screens at all, or that don't understand tables or that understand tables in different ways. If you have written your page in real HTML 4.01 Strict then your page will work on every browser that there is. CSS allows you to then drop in a second layer. You can control how all of those elements are displayed. Because you have used proper HTML 4.01 Strict you don't really care if a particular user's browser doesn't understand CSS. The page will still work.<!--content-->I see...thanks for the info.<!--content-->
 
Back
Top