Css selector to exclude child - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:element parent child

Description

Css selector to exclude child

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#banner {<!--from  ww w .  java 2 s  . c  o  m-->
   font-weight:bold
}

#banner>#subtitle {
   font-weight:normal
}
</style> 
 </head> 
 <body> 
  <h1 id="banner">Lorem ipsum dolor s<span id="subtitle">Lorem ipsum dolo</span> </h1>  
 </body>
</html>

Related Tutorials