Left margin
Left margin is a CSS property that defines the space between the left edge of an element and its surroundings, such as other elements, the browser window, or the edge of a container. Its syntax is “margin-left.” In HTML and CSS, a positive value increases the margin, while a negative value reduces it.
By adjusting the left margin, you can change the horizontal position of an element to align texts or images within a container.
Margins can also visually separate content, create a sense of hierarchy, and improve the overall readability of a site. For example, the margin-left property enables you to move a paragraph away from an element — such as an image or heading — creating a visual break and making it easier to read.
Here's what a CSS margin-left property looks like:
<div style="margin-left: 15px;">
<p>sample text</p>
</div>
In this example, the container element houses the sample text, with 15 pixels added to it on the left margin. As a result, the paragraph <p> moves 15 pixels away from the container's left edge.
You can apply left and auto margins to any block-level HTML element, including headings, paragraphs, and divs. Visit Webflow University to learn how to use spacing and padding effectively to make your webpages aesthetically pleasing and user-friendly.