---
title: "CSS Properties Explained: clear, clip-path, columns, content, and counter"  
description: "Let's look at each CSS property clear, clip-path, columns, content, and counter with detailed explanations and examples."  
author: "Ashutosh Patel"  
published: 2025-03-24  
updated: 2025-03-24  
canonical: https://www.mindstick.com/articles/338858/css-properties-explained-clear-clip-path-columns-content-and-counter  
category: "css-css3"  
tags: ["css-css3", "css", "css selector", "css styling", "css property"]  
reading_time: 4 minutes  

---

# CSS Properties Explained: clear, clip-path, columns, content, and counter

Let's look at each CSS [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) `clear`, `clip-path`, `columns`, `content`, and `counter` with detailed explanations and examples.

**1.** `clear` **(Managing Floats)**

The `clear` property is used to control how [elements](https://yourviews.mindstick.com/story/1372/the-5-elements-of-nature) behave around floated elements.

It prevents elements from wrapping around floated elements.

## Values

| **Values** | **Description** |
| --- | --- |
| none | Default, allows [floating](https://www.mindstick.com/articles/85595/how-to-troubleshoot-when-your-floating-pond-fountain-is-not-working-properly) elements next to it. |
| left | Prevents elements from floating on the left side. |
| right | Prevents elements from floating on the right side. |
| both | Prevents elements from floating on both sides. |

**Example:** Clearing Floats

```html
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Clearing Floats Example</title>
   <style>
       .container {
     width: 300px;
     border: 2px solid black;
 }
 .floated {
     float: left;
     width: 100px;
     height: 100px;
     background: lightblue;
     margin-right: 10px;
 }
 .clearfix::after {
     content: "";
     display: block;
     clear: both;
 }
   </style>
</head>
<body>
   <div class="container clearfix">
    <div class="floated">Floated</div>
    <p>This paragraph will wrap around the floated div if `clear` is not applied.</p>
</div>
</body>
</html>
```

The `.clearfix` class forces the [container](https://www.mindstick.com/interview/2198/what-method-is-used-to-specify-a-container-s-layout-in-java) to wrap around floated elements.

**2.** `clip-path` **(Clipping an Element)**

The `clip-path` property allows you to define a shape (circle, polygon, ellipse) to clip an element to

**Example:** Clipping an Image into a Circle

```html
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Clearing Floats Example</title>
   <style>
       .clipped-image {
     width: 200px;
     height: 200px;
     clip-path: circle(50%);
 }
 .clip-triangle {
     clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
 }
 .clip-ellipse {
     clip-path: ellipse(50% 30%);
 }

   </style>
</head>
<body>
   <div class="container clearfix">
    <img class="clipped-image" src="https://www.mindstick.com/Images/businessImages/business-help.jpg" alt="Clipped Image">
    <img class="clip-triangle" src="https://www.mindstick.com/Images/businessImages/business-help.jpg" alt="Clipped Image">
    <img class="clip-ellipse" src="https://www.mindstick.com/Images/businessImages/business-help.jpg" alt="Clipped Image">
</div>
</body>
</html>
```

## Output

![CSS Properties Explained: clear, clip-path, columns, content, and counter](https://www.mindstick.com/mindstickarticle/eea9ee31-86da-4722-858c-7c19ab1f99cd/images/ade659d3-ee90-46bf-89a7-4d88de9df95c.png)

## Note:

- It works best with images and block elements.

**3.** `columns` **(CSS Multi-Column Layout)**

The `Columns` property splits text into [multiple columns](https://www.mindstick.com/forum/156805/how-to-set-primary-key-constraints-on-multiple-columns-in-a-table-in-sql-server).

**Example:** Creating a Two-Column Layout

```html
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Clearing Floats Example</title>
   <style>
       .multi-column {
     columns: 2;
     column-gap: 20px;
     column-rule: 2px solid gray;
 }
   </style>
</head>
<body>
 <div class="multi-column">
    <p>This text will be split into two columns. This text will be split into two columns. This text will be split into two columns. This text will be split into two columns. This text will be split into two columns. </p>
</div>
</body>
</html>
```

## Column Properties

| **Property** | **Description** |
| --- | --- |
| column-count | Number of columns. |
| column-width | Sets the width of each column. |
| column-gap | Space between columns. |
| column-rule | Line between columns. |

## Note:

- [Responsive designs](https://www.mindstick.com/forum/160674/creating-responsive-designs-with-media-queries) can adjust [columns dynamically](https://www.mindstick.com/forum/161554/how-can-you-pivot-rows-into-columns-dynamically-using-t-sql).

**4.** `content` **(CSS [Generated Content](https://www.mindstick.com/forum/158461/how-can-you-implement-cache-control-for-dynamically-generated-content))**

The `content` property is used with the `::before` and `::after` pseudo-elements to insert content.

**Example:** Add icon before text on button

```css
.button::before {
   content: "🔹 ";
}
```

```html
<button class="button">Click Me</button>
```

Adding Quotes Dynamically

```css
.quote::before {
   content: "“";
}
.quote::after {
   content: "”";
}
```

```css
<p class="quote">This is a quote.</p>
```

## Note:

- Useful for adding decorative content without modifying the HTML.

**5.** `counter` **(CSS Counters)**

The `counter` property is used to create [automatic](https://www.mindstick.com/interview/2449/what-is-automatic-reference-counting-arc) numbering.

**Example:** Auto-Numbering Sections

```html
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>CSS Counter Example</title>
   <style>
    .section {
     counter-increment: section;
 }
 .section::before {
     content: "Section " counter(section) ": ";
     font-weight: bold;
 }
   </style>
</head>
<body>
 <div class="multi-column">
  <div class="section">Introduction</div>
 <div class="section">Main Content</div>
 <div class="section">Conclusion</div>
</div>
</body>
</html>
```

## Note

- Great for automatically numbering lists, sections or custom pagination.

Also, read: [CSS Properties Explained: offset, opacity, order, outline, and overflow](https://www.mindstick.com/articles/338855/css-properties-explained-offset-opacity-order-outline-and-overflow)

---

Original Source: https://www.mindstick.com/articles/338858/css-properties-explained-clear-clip-path-columns-content-and-counter

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
