how to get width of inline elements js code example Example: how to get width of inline elements js <style> span { display: inline-block ; } </style>