VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-clientwidth-property/

⇱ HTML DOM clientWidth Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM clientWidth Property

Last Updated : 9 Jun, 2023

The DOM clientWidth Property is used to return the viewable width of a specific element including padding but excluding the measurement of margin, border, and scrollbar width. This property only returns the actual width of an element that is viewable or visible to the user. It is a read-only property. 

Syntax:

element.clientWidth 

Return Value: It returns a Numeric value that represents the viewable width of an element. 

Example: In this example, we will use DOM clientWidth property

Output: 

👁 Image
 

Supported Browsers: The browser supported by DOM clientWidth property are listed below:

  • Google Chrome 1.0
  • Edge 12.0
  • Internet Explorer 5.0
  • Firefox 1.0
  • Opera 8.0
  • Safari 3.0
Comment