1
The CSS
can be applied in three different ways in a document HTML
:
- within the tag itself (
inline
):
<body>
<h1 style='color: red';> Hello World </h1>
</body>
- within the tag
head
:
<head>
<style>
.myclass {
color: red;
}
</style>
</head>
- with a document
.css
external, within the taghead
:
<head>
<link rel='stylesheet' href='css_folder/css.css'>
</head>
These applications can be seen in the figure below:
Doubt:
How these applications interrelate and;
What is the relationship between them and the name "Cascading STyle Sheets"?
Ok. I think the decision to mark the question as duplicate is valid. I just wanted to understand what each of the letters of the acronym would be CSS. For example, why cascade, why style and why sheet. It seems childish doubt, but as I’m starting to use CSS now, these terms are confusing to me. Now, on the Internet there are several models and divergent explanations. Grateful.
– neves
Neves is exactly the way it translates. " Cascading style sheet", ie is top down, top down, and the one below has priority. If vc declares at the top
body {bg:red}
and there at the end of the "cascade"body {bg:blue}
the background turns blue and not red, because the cascade does not recede. The image of your question, more has to do with the hierarchy and selector priority at the time of applying the CSS and is not so related to the term "cascade style sheet" more properly ...– hugocsl
The image of your question, more has to do with the hierarchy and selector priority at the time of applying the CSS and is not so related to the term "cascade style sheet" more properly. As I said, I started studying CSS a few days ago. So the confusion of concepts. Some are disconnected to me. But thank you for clarifying the doubt and I’m sorry if I asked the question inaccurately.
– neves
Tranquil Neves, read the marked questions that will already be a good start to understand the fundamentals of CSS. Sucesso [] s
– hugocsl