Thursday, 4 July 2013

CSS INHERIT VALUES

CSS INHERIT VALUES

Inheritance means to get the values from the parents. Same thing is applied in the css style element. We can use the inherit values to implement a specified attribute of some element from the parent element. The child element will take the same value as the parent element specified. The value is explicitly specified at the end of the CSS property  before the semi colon.

Here is the Simple output and code:

USE THE CSS TO INHERIT THE VALUES

INHERIT VALUES USING CSS


The inherit values means that all the elements of textual content will use the same font family which is in this case is Times roman . This thing is known as the inherit values.

Look out this heading using differnt fonts but not shown

<style type="text/css" media="screen">
BODY
{
font:"Times New Roman";
background:PINK;
color:yellow;
}
*
{
font-family: inherit;
}
</style>

<body>
<h1> INHERIT VALUES USING CSS </h1>
<hr />
<p> The inherit values means that all the elements of textual content will use the same <b> font family which is in this case is Times roman </b>. This thing is known as the inherit values.</p>
<h2><font face="Arial Black, Gadget, sans-serif"> Look out this heading using differnt fonts but not shown</font></h2>


2 comments:

  1. hi sir its me samina shafqat. u there

    ReplyDelete
  2. Assalam-o-alaikum,
    Respected sir, Hope you will be in the best of your health,
    I wanted to inform you that I will not be able to come tomorrow,
    and also i have done some work regarding website,and I have also changed my topic because I was not satisfied with bakery project,Now i am thinking of making a website for special children institute,
    I have given it a lot of thought and i really want to do this project.
    Thankyou!

    sincerely,
    Qurat ul Ain

    ReplyDelete