One element Type Selector

  • 0


4) One element type selector

This selector must match one or more HTML elements of the same name.


No Syntax





<html>
<head>

<style>

p
{
background-color:Bisque
}


div
{
 font-size: 80px
}


h1
{
color:DeepPink
}


</style>

</head>
<body>

<h1>Welcome to My Homepage</h1>

<div>
<p> My name is Donald.</p>
<p> I live in Duckburg.</p>

</div>


<p>My best friend is Mickey.</p>


</body>
</html>




h1,h2,h3 { color: darkred; /* color of h1 h2 h3 should be darkred */ font-variant: small-caps; /* h1 h2 h3 should be in small caps */ } - See more at: http://www.w3resource.com/css/selectors/grouping-of-CSS-selectors.php#sthash.oWMhgKs5.dpuf










<html>
<head>
<style>
h1
{
font-family:"Times New Roman",Georgia,Serif;
border-style: solid;
border-color: red
}

.tagline
{
 border-bottom-style: dotted;
 color: green
}

#intro
{
    background: #dddddd;
    border-radius: 40px;
    padding: 10px 40px;
}

</style>
</head>
<body>

<h1>Welcome to My Homepage - Type Selector - Selects an element by it’s type </h1>

<div id="intro">

<p>  I am id Start here </p>

<p class="tagline"> I am class start here and also end here  </p>

<p>  I am id End here </p>

</div>




No comments:

Post a Comment