HTML | DOM Style transformOrigin Property Last Updated : 07 Jun, 2022 Comments Improve Suggest changes Like Article Like Report Every HTML element has some position on the screen. This position is described using co-ordinate geometry using x-axis and y-axis. The HTML DOM Style transformOrigin Property used to change the position of an HTML div. It helps in both 2D and 3D transformation.Syntax: To set the transformOrigin property: object.style.transformOrigin="x-value y-value" To return the transformOrigin property: object.style.transformOriginReturn Values: It returns a string value that represents the transform-origin property of an elementx-axis: Placed value of x-axis.y-axis: Placed value of y-axis.z-axis: placed value of z-axis in 3D.initial: Set default value of element.inherit: Inherit from its parent element Example: Transform the origin of circle 2. html <!DOCTYPE html> <html> <head> <title> HTML | DOM Style transformOrigin Property </title> <script> //the following script will find element // whose id is circle2 and transform //it's position to origin function myFunction() { document.getElementById( "circle2").style.transformOrigin = "0 0"; } </script> <style> #circle1 { height: 150px; width: 150px; margin: auto; border: 1px solid black; border-radius: 50%; } #circle2 { width: 150px; height: 150px; border: 1px solid black; background-color: #0f9d58; transform: rotate(45deg); border-radius: 50%; } #circle3 { position: absolute; width: 150px; height: 150px; border: #0f9d58; background-color: #0f9d58; opacity: 0.5; border-radius: 50%; } </style> </head> <body> <button onclick="myFunction()"> Submit </button> <div id="circle1"> <div id="circle2"></div> <div id="circle3"></div> </div> </body> </html> Output Before clicking on button: After clicking on button Note: For safari used "WebkitTransformOrigin" instead of "transformOrigin".Supported Browsers: The browsers supported by HTML | DOM Style transformOrigin Property are listed below: Google ChromeEdgeFirefoxOpera Comment More infoAdvertise with us S Shahnawaz_Ali Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM KeyboardEvent shiftKey Property The KeyboardEvent shiftKey property in HTML DOM is a read-only property and used to return a Boolean value which indicates the SHIFT key is pressed or not. The KeyboardEvent shiftKey property returns true if the SHIFT key is pressed, otherwise returns false. Syntax: event.shiftKey Below program illu 1 min read HTML | DOM Form length Property The DOM Form length Property is used to return the number of input field contained in the form. Syntax: formObject.length Return Value: It returns a numeric value which represent the number of input field or elements in the Form. Example-1: Return the number of input field. html <!DOCTYPE html 2 min read HTML | DOM Form acceptCharset Property The DOM Form acceptCharset Property is used to set or return the value of the accept-charset attribute in the form Element. The accept-charset attribute is used to define the character encoding and is used for form submission. The default value of the accept-charset attribute is âUNKNOWNâ string whi 2 min read HTML | DOM KeyboardEvent metaKey Property The KeyboardEvent metaKey property in HTML DOM is a read-only property and is used to return a Boolean value which is used to check whether the META key is pressed or not. The KeyboardEvent metaKey property returns true if the META key is pressed, otherwise returns false. Syntax: event.metaKey Below 1 min read HTML DOM Select Object The Select object in HTML DOM is used to represent an HTML <select> element. It provides properties and methods to manipulate the <select> element and its associated <option> elements.Syntax:To create <select> element. document.createElement("SELECT")To access <select> 3 min read HTML | DOM TouchEvent touches Property The TouchEvent touches property in HTML DOM is used to return the array of touch object. It returns one for each finger that is currently touching to the surface. The touches property is a read only property and it returns an array of touch objects. Syntax: event.touches Return Value: It return the 1 min read HTML | DOM form method Property The DOM Form method Property is used to set or returnthe value of the method attribute in the form. The method attribute is used to specify the HTTP method used to send data while submitting the form. There are two kinds of HTTP Methods, which are GET and POST. Syntax: It is used to return the metho 3 min read HTML | DOM Form name Property The DOM Form name Property is used to set or return the value of the name attribute in a form. The name attribute is required for each input field. If the name attribute is not specified in an input field then the data of that field would not be sent at all. Syntax: It is used to return the name pro 2 min read HTML | DOM Style alignSelf Property The DOM Style alignSelf property is used to set or return the alignment for a selected item inside a flexible container. Syntax: To get the alignSelf Propertyobject.style.alignSelfTo set the alignSelf Propertyobject.style.alignSelf = "auto | stretch | center | flex-start | flex-end | baseline | init 6 min read HTML DOM Input Date Object HTML Input Date object represents an <input> element with type="date", enabling users to input dates conveniently via a built-in calendar interface on web forms. Syntax:Â For creating a <input> element with the type ="date":var gfg = document.createElement("input") gfg.setAttribute("type 3 min read Like