li + li : Sibling Selector « Style Basics « HTML / CSS






li + li

 

<html>
<head>
<title>li + li </title>
<style type="text/css">
  li + li {
 font-size: 200%;
  }
  -->
</style>
</head>

<body>
  <h1>Title of Page</h1>

  <p>This is a sample paragraph with a <a href="http://www.java2s.com" class="warning">link</a>. After p. <em class="warning"> in em</em>. After em.</p>

  <ul id="navigation">
    <li class="warning"><a href="http://www.java2s.com">A</a></li>

    <li><a href="http://www.java2s.com">B</a></li>

    <li><a href="http://www.java2s.com">C</a></li>
  </ul>
</body>
</html>

 








Related examples in the same category

1.Sibling Selector with +
2.Direct Adjacent Sibling Combinators
3.Add tag together
4.img+p
5.direct adjacent sibling combinator