"Only Select single tag (only-of-type)"
Bootstrap 3.3.0 Snippet by naimansari

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div><h1>This is a paragraph.</h1></div> <h1>This is a paragraph.</h1> <h1>This is a paragraph.</h1> <h1>This is a paragraph.</h1> <div><h1>This is a paragraph.</h1></div> </div> <p>The :only-of-type selector matches every element that is the only child of its type, of its parent.</p> </div>
h1:only-of-type { background: #ff0000; }

Related: See More


Questions / Comments: