Adscend

Click Here



Click Here



Click Here

9.9.13

Child Selector

CSS Child Selector

A child selector in  HTML is  a tag that inside another tag make relation.

In this example, <head> is child of <html>, so <html> would be parent and <head> would be child.
<body> is also child of <html>, since <body> is inside of <html>.
<style> is a child of <head>, since <style> is inside of <head>. <style> is child, <head> is parent.
If <head> is child of <html>, <style> is grand child of <html>. <html> is grand parent of <style>.



Example: 1
<html>
<head>
 
  <style type="text/css">
     p > a {
                  color: #888888;
                  font-weight: bold;
                  font-size: 30px;}
   </style>
  
 </head>
<body>
 <p> I am here to fulfill a noble mission. I will welcome death only after my mission is fulfilled.</p>
  <p> <a href="http://aspell.org">The greatest hero is the one who has established mastery over his own animal instincts.<br />
     I will keep my animal desires under control.</a></p>
   <p> The enlightened never impose, they always inspire. I will also inspire others to share my beliefs and ideals.</p>
</body>
</html>
Output

I am here to fulfill a noble mission. I will welcome death only after my mission is fulfilled.

The greatest hero is the one who has established mastery over his own animal instincts.
I will keep my animal desires under control.

The enlightened never impose, they always inspire. I will also inspire others to share my beliefs and ideals.



All link types, inside paragraph, the above style is applied.





No comments:

Post a Comment