Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <p>
  <!-- hidden link for keyboard testing -->
  <a class="test" href="http://example.com">before</a>
</p>

<h2>Water consumption</h2>

<svg role="img" width="555" height="300" style="overflow: hidden;" aria-labelledby="diag">
	<title id="diag">Diagram water consumption (text version below)</title>

		<rect x="0" y="0" width="555" height="300" stroke="none" stroke-width="0" fill="#ffffff"></rect>
		<g aria-hidden="true">
			<rect x="0" y="20" width="555" height="225" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect>
			<g>
				<!--les lignes horizontales-->
				<g>
					<rect x="0" y="244" width="555" height="1" stroke="none" stroke-width="0" fill="#cccccc"></rect>
					<rect x="0" y="188" width="555" height="1" stroke="none" stroke-width="0" fill="#cccccc"></rect>
					<rect x="0" y="132" width="555" height="1" stroke="none" stroke-width="0" fill="#cccccc"></rect>
					<rect x="0" y="76" width="555" height="1" stroke="none" stroke-width="0" fill="#cccccc"></rect>
					<rect x="0" y="20" width="555" height="1" stroke="none" stroke-width="0" fill="#cccccc"></rect>
				</g>
				<!--les rectangles verts de différentes hauteurs-->
				<g>
					<rect x="21" y="151" width="68" height="93" stroke="#cde682" stroke-width="1" fill="#cde682"></rect>
					<rect x="132" y="81" width="68" height="163" stroke="#cde682" stroke-width="1" fill="#cde682"></rect>
					<rect x="243" y="74" width="68" height="170" stroke="#cde682" stroke-width="1" fill="#cde682"></rect>
					<rect x="354" y="48" width="68" height="196" stroke="#cde682" stroke-width="1" fill="#cde682"></rect>
					<rect x="465" y="67" width="68" height="177" stroke="#cde682" stroke-width="1" fill="#cde682"></rect>
				</g>
				<g>
					<rect x="0" y="244" width="555" height="1" stroke="none" stroke-width="0" fill="#333333"></rect>
				</g>
				<g>
					<rect x="55" y="151" width="1" height="0" stroke="none" stroke-width="0" fill="#999999"></rect>
					<rect x="166" y="81" width="1" height="0" stroke="none" stroke-width="0" fill="#999999"></rect>
					<rect x="277" y="74" width="1" height="0" stroke="none" stroke-width="0" fill="#999999"></rect>
					<rect x="388" y="48" width="1" height="0" stroke="none" stroke-width="0" fill="#999999"></rect>
					<rect x="499" y="67" width="1" height="0" stroke="none" stroke-width="0" fill="#999999"></rect>
				</g>
			</g>
			<g></g>
				<g>
					<g>
						<text text-anchor="middle" x="55.9" y="262.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">28.06.2010 - 07.</text>
						<text text-anchor="middle" x="55.9" y="278.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">06.2011</text>
					</g>
					<g>
						<text text-anchor="middle" x="166.7" y="262.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">08.06.2011 - 03.</text>
						<text text-anchor="middle" x="166.7" y="278.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">06.2012</text>
					</g>
					<g>
						<text text-anchor="middle" x="277.5" y="262.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">04.06.2012 - 26.</text>
						<text text-anchor="middle" x="277.5" y="278.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">05.2013</text>
					</g>
					<g>
						<text text-anchor="middle" x="388.3" y="262.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">27.05.2013 - 04.</text>
						<text text-anchor="middle" x="388.3" y="278.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">06.2014</text>
					</g>
					<g>
						<text text-anchor="middle" x="499.09999999999997" y="262.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">05.06.2014 - 29.</text>
						<text text-anchor="middle" x="499.09999999999997" y="278.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#222222">05.2015</text>
					</g>
				</g>
				<g>
					<g>
						<g>
							<text text-anchor="middle" x="55" y="163.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#404040">101m3</text>
							<rect x="35.5" y="153" width="39" height="12" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect>
						</g>
					</g>
					<g>
						<g>
							<text text-anchor="middle" x="166" y="93.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#404040">176m3</text>
							<rect x="146.5" y="83" width="39" height="12" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect></g>
						</g>
						<g>
							<g>
								<text text-anchor="middle" x="277" y="86.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#404040">183m3</text>
								<rect x="257.5" y="76" width="39" height="12" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect>
							</g>
						</g>
						<g>
							<g><text text-anchor="middle" x="388" y="60.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#404040">211m3</text>
							<rect x="369" y="50" width="38" height="12" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect>
						</g>
					</g>
					<g>
						<g>
							<text text-anchor="middle" x="499" y="79.2" font-family="Arial" font-size="12" stroke="none" stroke-width="0" fill="#404040">191m3</text>
							<rect x="479.5" y="69" width="39" height="12" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect>
						</g>
					</g>
				</g>
			</g>
			<g></g>
			</svg>

<table class="table">
  <caption>Water consumption</caption>
		<thead>
		<tr>
			<th>
				Date
			</th>
			<th>
				Amount
			</th>
		</tr>
		</thead>
		<tbody>
		<tr>
			<td>
				28.06.2010 - 07.06.2011
			</td>
			<td>
				101
			</td>
		</tr>
		<tr>
			<td>
				08.06.2011 - 03.06.2012
			</td>
			<td>
				176
			</td>
		</tr>
		<tr>
			<td>
				04.06.2012 - 26.05.2013
			</td>
			<td>
				183
			</td>
		</tr>
		<tr>
			<td>
				27.05.2013 - 04.06.2014
			</td>
			<td>
				211
			</td>
		</tr>
		<tr>
			<td>
				05.06.2014 - 29.05.2015
			</td>
			<td>
				191
			</td>
		</tr>
</tbody>
</table>

<p>
  <!-- hidden link for keyboard testing -->
  <a class="test" href="http://example.com">after</a>
</p>

<hr>

<h2>Explanation</h2>
<ul>
  <li>ARIA role="img" helps screenreaders identify the SVG as an image.</li>
  <li>The title element gives a short description of the image.</li>
  <li>The aria-labelledby attribute connects the SVG to the title element to boost support for screenreaders.</li>
  <li>The focusable="false" attribute fixes a bug in IE. SVG's shouldn't receive keyboard focus by default.</li>
  <li>aria-hidden="true" on the g element who's children contain text, hides that text for screenreaders. It's confusing without the visual context.</li>
  <li>The table below the SVG serves as the textual alternative for the diagram.</li>
</ul>

              
            
!

CSS

              
                svg {
    height: em;
    width: em;
}

.test {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.test:focus {
    position: static;
    width: auto;
    height: auto;
    margin: inherit;
    overflow: visible;
    clip: auto;
    -webkit-clip-path: none;
    clip-path: none;
    white-space: inherit;
}

* {
  font-family: Helvetica,sans-serif;
}

td, th{
  border: 1px solid #ccc;
  padding: 0.25em;
  text-align: center;
}
              
            
!

JS

              
                  
              
            
!
999px

Console