Pen Settings



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


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


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.


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.


                <h2>CSS: Substring Value Attribute Selectors</h2>
<p>Interesting note: <code>list-tyle-position:  inside</code></p>
<p>Attribute selectors good for styling forms</p>
  <li lang="en-GB" data-perf="inc-pro"><a href="#" target="_blank">Manchester United></a></li>
  <li lang="es" data-perf="same-pro">Barcelona</li>
  <li lang="de" data-perf="dec">Bayern Munich</li>
  <li lang="es" data-perf="same tilde">Real Madrid</li>
  <li lang="de" data-perf="inc-rel">Borussia Dortmund</li>
  <li lang="en-GB" data-perf="dec-rel">Southampton FC</li>


                h2, p {
  padding-left: 30px;

ol {
  padding: 0 30px 0;
// select elements w specified attribute
li a[target="_blank"] {
  text-decoration: none;
  color: purple;
// pipe | select elements w specified attribute beginning w specified value
li[lang|="en-GB"] {
  background: url("") 5px center no-repeat;
  background: url("") 5px center no-repeat;
  background: url("") 5px center no-repeat;
// carot ^ select element whose value begins w specified value 
li[data-perf^="same"] {
  background-color: cyan;
li[data-perf^="inc"] {
  background-color: lightblue;
li[data-perf^="dec"] {
  background-color: pink;
li[data-perf^="inc"]::after {
  content: '⤴';
// $ select element that ends w specified value
li[data-perf$="pro"] {
  font-weight: bold;
li[data-perf$="rel"] {
  font-style: italic;
  color: #666;
// select element w attribute value containing specified word
li[data-perf~="tilde"] {
  border: dotted 5px red;
// * select element whose attribute contains a specified value
li[data-perf*="-"] {
  text-decoration: underline;

li {
  padding: 3px 3px 3px 34px;
  margin-bottom: 5px;
  /* inside | outside (default) | inherit */
  list-style-position: inside;