CSS cannot override the style defined in HTML?


#1

Hi I am a newbie and got a question :open_mouth:

for example, in the HTML body, I define the font size like this:

"p style="font-size:20px">I am a man

Then, in the CSS, define:

p {
font-size:50px;
}

I didnt see any effects made by CSS. So the question will be: can I safely say that if certain style already exists in the HTML, then, we cannot redefine them using CSS

thank you :slightly_smiling:


#2

it seems that the the style you have in your html is the prioriter on your css,
But it's better to put everything in a file in .css

( Sorry for my English google Translation is my friend :innocent: )


#3

css uses a point system to resolve conflicting property's. If you want, i can give you a link for a detailed article. But it is safe to say, style attribute will always have more points. (so the value of the style property gets applied)


#4

thank you for the clarification...
As a beginner, I am trying something new and odd to see what's going on :slightly_smiling:
yes, please show me the article, I dont mind sparing more time on reading exciting stuffs :open_mouth:


#5

It is quit complex, but here is a link to the article