HTML vs. CSS?
I am redesigner an interactive webpage for work. Can anyone give me advice about what type of formating I should use? I know basic HMTL but plan on getting a guide for whatever style I will be using. Opinions please on CSS and HTML. Pros/Cons of each. That sort of thing. Thanks.
Observing members:
0
Composing members:
0
9 Answers
The point of CSS is to capture style information in a single location..Not only is this good coding pracitice, but if you use the CSS styles consistently, you can change the look of your web site simply by modifying the CSS. Think ‘Skins’.
What I am creating is a page where you can put in information such as locations, flight levels, areas, etc., and hit an input button (of sorts) then have another page load with all that information. Would CSS be good for that?
CSS is good practice in general, but has more value if you’re doing lots of different pages.
If you are only creating a single page, it might not be worth the trouble to gather all your styles into a CSS.
Read Pro CSS technique by Croft, Lloyd, Rubin. Great guide that taught me css when I only knew basic html
CSS and HTML are not mutually exclusive. You use both of them together to create good web pages. Even for a small site, CSS is vastly superior to using HTML tables for layout for a variety of reasons. Buy a book or do some google searches on CSS and HTML and web site design and coding and you’ll find a lot of info available.
As @Grisson wrote, it allows you to change the look of the site simply by changing the CSS.
Separating presentation from content is a very big deal.
For a mind-blowing illustration of the concept, see the CSS Zen Garden. Click the different options under “Select a Design” and watch the entire site change drastically.
The content (HTML) is not changing, ‘View Source’ to confirm that. Only the presentation (CSS) is different.
http://www.csszengarden.com/
CSS is also better for people with visual impairments that need to use screen readers. The screen readers will read back the content of the site to them, but not the CSS which is exactly what they want… just the content.
This question does not make sense. HTML and CSS are not two different things but rather markup languages that should be used in tandem. HTML is intended to present content—articles on a news website, for example. CSS is for presentation and layout (essentially all the trimmings and things to pretty it up), like making article headings large and bold so they’re easy to see, giving a website a blue background, and so on. HTML = content, CSS = style. There are a ton of really great websites that address this, but I have found 456 Berea Street to be enormously useful when it comes to explaining the HTML/CSS differences and what each should be used for. Googling anything about ’separation of style and content’ might be a good start as well.
I believe what some people are addressing when they say “CSS is better!” is actually that, if you are trying to construct a web layout, it is vastly preferable to use CSS techniques in order to create, say, a three-column site structure, as opposed to using the generally reviled HTML trick of using tables. The reason is that CSS is specifically designed to make websites look good, whereas HTML tables were only intended to display tabular data like lists of people and their heights, and not used for the presentational (visual) aspect of a site.
On your website, the HTML would essentially be written to tell the browser, “Put a form field for people to input their location here, and next have a dropdown where they can select a date, and after that have a submit button when they’re done filling out the form.” Then the CSS might say, “Make the labels for the form fields 14pt Verdana, have the submit button be green, and have a picture of the company logo in the top right corner of the site.” Does this make sense, somewhat?
Answer this question