General Sibling Selector

The general sibling selector selects elements that follow another specified element, but not necessarily immediately.

The general sibling Selector has the following syntax:

<first selector> ~ <second selector>
        <!DOCTYPE HTML> 
                <style type="text/css"> 
                p ~ a { 
                    border: thin black solid; 
                    padding: 4px; 
                <a href="">Visit the</a> 
                <a href=""></a> 
                <a href="">CNN</a> 
Click to view the demo
  HTML CSS Book 

Selectors Combination:
  1. Selector Unions
  2. Selecting Descendant Elements
  3. Selecting Child Elements
  4. Immediate Sibling Selector
  5. General Sibling Selector