---
layout: api
title: "v3.3.0 JavaScript Library: L.DivIcon"
categories: api
version: v3.3.0
permalink: /api/v3.3.0/l-divicon/
---
<h2 id="divicon">DivIcon</h2>

<p>Represents a lightweight icon for markers that uses a simple <code>div</code> element instead of an image.</p>

<pre><code class="javascript">var myIcon = L.divIcon({className: 'my-div-icon'});
// you can set .my-div-icon styles in CSS

L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);</code></pre>

<p>By default, it has a <code><s