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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <div class="wrapper">
  <label for="tuningSelector">Select an open tuning:</label><br>
      <select id="tuningSelector">
        <option value="">- Choose a tuning -</option>
        <option value="standard">Standard tuning</option>
        <option value="openC">Open C</option>
        <option value="dropD">Drop D</option>
  <div id="tuning"></div>
  <p class="notes"><h4>Concept:</h4><p>The idea is to enable selection of an alternate "open tuning" from the menu, and display the notes. Then, it would be great to make the notes clickable buttons to play the appropriate notes in order to make it easy to quickly tune a guitar to the new tuning and try it out.</p>
  <h5>Process:</h5><p>I started with an idea, and an example. I brainstormed a bit, then built a mockup to help clarify what the elements would be, refine the idea and then prototype to test and validate the concept.</p><p>I'm still working on getting the JavaScript to show the notes properly and then I'll remove everything that's not necessary. Ultimately, it will consist of: a logo, menu, a display of playable notes, and a brief paragraph of instructions.</p>
  <p class="textTiny"><em><strong>Thinking out loud:</strong> tuning type should be an array (<code>Map object</code> &#151; see link below, I think?) or an object so I can display each note as a discrete item using key-value pairs. The final goal is to present open tunings and make each note (tap/click) playable using the <code>&lt;audio&gt;</code> element</em></p>
  <p class="notes">Reference &#187; <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">MDN Webdocs: JavaScript</a></p>
              @import url('https://fonts.googleapis.com/css?family=Special+Elite');
body {
	background-color: rgb(238, 238, 238);
	background-image: url(https://tamarodesign.org/images/backgrounds/body-background.jpg);
	background-repeat: no-repeat;
	background-position: center top;
  font-family: Sans-serif; 
  margin: 1em 3em; 
  padding: 1em;
code {background: wheat; padding: 2px 4px;}
.textTiny {font-size: 11px;}
p.notes {font-size: smaller;}
select {
  padding: .5em;
  margin: 1em 1em 1em 0
#tuning {
  background: rgba(255,255,255,.65);
  align-items: center;
  border: 1px solid #ddd;
  display: flex;
  flex-wrap: wrap;
  height: 2em;
  justify-content: space-around;
  margin: 0 1em 1em 0;
  padding: .5em;
  /*width: 17em;*/
  font-size: 2em;
  font-weight: bold;
  line-height: 1;
.wrapper {
  margin: auto;
  width: 19em;
h2, h3, h4, h5 {
  font-family: 'Special Elite', cursive; 
  line-height: 1; 
  margin: .125em auto; }
h3 {
  font-size: 3.3em; 
  font-weight: bold;
  margin: .1em auto -.1em -30px;
  text-align: center;
h4 {font-size: 1.5em;}
h5 {font-size: 1.2em;}
              var select = document.querySelector('select');
var tuning = document.getElementById('tuning');

select.onchange = setTuning;

function setTuning() {
    var choice = select.value;
  if(choice === 'standard') {
    tuning.textContent = 'E A D G b e';
    } else if(choice === 'dropD') {
      tuning.textContent = 'D A D G b e';
    } else if(choice === 'openC') {
      tuning.textContent = 'C G C G c e';
  } else {
    tuning.textContent = '';
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.