Advertisements
Advertisements
प्रश्न
Which CSS code would be applied to an element, the one defined within the STYLE element of the page or the one defined within the style property of the element? Take the following code as an example. What would be the size of the font in the DIV element?
<html>
<head>
<title>My page</title>
<style type="text/css">
div { font-family: Verdana;
font-size: 9pt;
}
</style>
</head>
<body>
<div style="font-weight: bold; font-size: 12pt;"> My text </div>
</body>
</html>कोड लेखन
लघु उत्तरीय
Advertisements
उत्तर
Both would be applied, but the one specified in the style property would be fully applied and might take priority over the code specified in the page’s STYLE element. The following style would be applied to the DIV element (the value in the style property would take priority over the font-size):
font-family: Verdana; font-weight: bold; font-size: 12pt;shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
