+ 4
Why we should prefer css for design rather than using html only, confused😧
is css and html interdependent
7 Antworten
+ 2
You can expand some tag declaration in HTML to edit certain properties of said tag, but when you abstract those details away, it still is CSS that allows such to be possible. So HTML and CSS are interdependent in a way, HTML can work without CSS, but the webpage will have no style at all. Learning CSS is what makes good webpage design possible.
+ 7
Think of the HTML document as a hierarchical data structure containing semantically organized content / information. This data may be presented differently based on the client. The rendering of this data might be different in a desktop browser than on a mobile app.
Decoupling your CSS out into a separate file allows you to apply different themes without modifying the HTML document. In fact, this allows you to support multiple themes against the same content.
A great demonstration of this concept can be seen on http://www.csszengarden.com where hundreds of stylesheets have been submitted for a single HTML document. If you start viewing the many different styles on that website, you will realize the power of decoupling data from presentation.
+ 4
Simply because it is impossible to add styles using only HTML. Even if you use the style attribute on the tags, you would be using CSS.
HTML is just the skeleton of a web page. If you want an element to be visualized in a particular way (different from its original form) you must manipulate it through CSS.
Having a page without styles is not visually appealing, and it takes away a lot of functionality from the page. Which together harms the user's experience.
+ 2
A PC user, a smartphone user, a blind person using a screen reader, or a web crawler like Google's all will likely want to see the same content on your website. But the styling may be very different!
A blind person does not care whether a text is <b>bold</b> or <font>green</font>, but he will care about <em>emphasis</em> for example, or which parts of your document are important and which aren't (<header>,<aside>,...)
So thats why all the "styling tags" like <font> or <marquee> or <big> are no longer HTML, and we moved all the styling to CSS.
Usually, if you do "styling" in HTML, you really only take advantage of the default CSS stylesheet that browsers carry along, because HTML itself conveys no visual information. (<strong> is not bold because it has to be, but because the default stylesheet in browsers have a `strong{ font-weight: bold }` somewhere inside. It's just like CSS you never wrote)
+ 2
You can use html itself but the web pages will be plain and not colorful 😀,pure skeleton, css will give the page skin
+ 1
it makes managing properties of different elements easier
+ 1
Because,
HTML - is standart markup language for creating web pages.
CSS - is Cascading Style Sheets, a language used to describe the style.
It's easy😉