Tuesday, July 15, 2014

The Styles Priority

as we know there's 3 types of styles but if we write more than one type who'll be the active one?
thats a common question for most of beginners just like me :D
i searched alot on the internet and come out with this conclusion
the nearest style is the active one for example : 
the style css file:
<style>
p {color : red;}
</style> 
*********************
the html file
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<p style="color:blue"> Hello</p> */ what do you think the color of paragraph will be it will be blue as i said it takes the nearest so if we have Embedded style and external style the Embedded style will work not the external one 
</body>
</html>

No comments:

Post a Comment