Using :first-child wrapped in :not() :
Fiddle
#test1 p:not(:first-child) { display:none; }
Please note that first-child not supported by IE8 or earlier. If you need full cross-browser support, you will have to use Javascript.
Javascript solution will be:
Fiddle
var div = document.getElementById("test1"); var pList = div.getElementsByTagName("p"); for(var i=0; i<pList.length; i++) { if(pList[i] != div.children[0]) { pList[i].style.display = "none"; } }
source share