HTML
get class css <style> .class{ height:380px;width:98%; border: 5px solid yellow ;font-size: 20px ; background-color:oldlace; } </style>
get id css <style> #div { width:98%; height:380px ; border: 5px solid yellow ; font-size: 20px ;} </style>
<script> var cssObj = window.getComputedStyle( DP , null) var txt="" ; for (i = 0; i < cssObj.length; i++) { txt += cssObj[i] +" = "+cssObj.getPropertyValue(cssObj[i]) ; txt += "<br>" } DP.innerHTML = txt ; </script> <div id="DP">