title: Center an Element Horizontally Using the margin Property
challengeType: 0
videoUrl: 'https://scrimba.com/c/cyLJqU4'
---
## Description
<sectionid='description'>
Another positioning technique is to center a block element horizontally. One way to do this is to set its <code>margin</code> to a value of auto.
This method works for images, too. Images are inline elements by default, but can be changed to block elements when you set the <code>display</code> property to block.
</section>
## Instructions
<sectionid='instructions'>
Center the <code>div</code> on the page by adding a <code>margin</code> property with a value of auto.