Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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.


    <h1>Cool Counsellor</h1>
    <h2>Specialization here</h2>

<div id="container">

    <nav role="tablist">
        <a href="#about" id="about-tab" role="tab" class="active">About</a>
        <a href="#practice" id="practice-tab" role="tab">Practice</a>
        <a href="#fees" id="fees-tab" role="tab">Fees</a>
        <a href="#contact" id="contact-tab" role="tab">Contact</a>

    <section id="about-content" role="tabpanel">

            Hello! Here's a bit about me and my experience...
            And a bit more down here in another paragraph.


    <section id="practice-content" role="tabpanel" class="visuallyhidden">

            <li>Item 1</li>
            <li>Item 2</li>
            <li>Item 3</li>
            <li>Item 4</li>

    <section id="fees-content" role="tabpanel" class="visuallyhidden">

            Details on fees...

    <section id="contact-content" role="tabpanel" class="visuallyhidden">

            Please email <a href="mailto:[email protected]" rel="noopener">[email protected]</a> for more information.
            Office: by appointment only.


                #container {
  margin: 1em auto;
  display: flex;
  flex-direction: column;
  padding: 0 15px 30px;

nav {
  display: flex;
  justify-content: space-between;

nav a,
nav a:active,
nav a:focus {
  outline: none;

nav a {
  text-decoration: none;
  color: #222;
  padding: 10px 2px 5px 2px;
nav {
  border-bottom: 3px solid #555;

section {
  margin-top: 1em;

body {
  font-family: "Segoe UI", Tahoma, Geneva, sans-serif;

header {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: white;
  padding: 25px 0 21px;

h2 {
  margin: 0;

h1 {
  font-size: 1.49em;

h2 {
  font-size: 1.21em;

h3 {
  text-transform: uppercase;

@media (min-width: 730px) {
  #container {
    width: 700px;

 * Hide only visually, but have it available for screenreaders

.js-enabled .visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;

 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard

.js-enabled .visuallyhidden.focusable:active,
.js-enabled .visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;


                (function() {
  // Array of known tab names. Update this list when a tab is added.
  var tabs = ["#about", "#practice", "#fees", "#contact"];
  var currentTab = "#about";

  // Open the provided tab name, if it's valid
  function openTab(tabName) {
    // Is this a valid hash?
    if (tabs.indexOf(tabName) < 0) {
      tabName = tabs[0];
    // Hide the current tab
    document.querySelector(currentTab + "-tab").classList.remove("active");
      .querySelector(currentTab + "-content")

    // Activate new tab
    document.querySelector(tabName + "-tab").classList.add("active");
      .querySelector(tabName + "-content")
    currentTab = tabName;

    // Fire Google analytics event
    if ( {
      var trackingUrl = tabName.replace("#", "/");
      ga("set", "page", trackingUrl);
      ga("send", "pageview");

  // Listen for hash changes
    function hashChangeHandler(e) {
      if (location.hash) {

  // If a hash is provided initially, open the tab if refers to.
  // This enables "deep linking" into the site's pages.
  var initialHash = location.hash;
  if (initialHash) {
  // JS is enabled! Set a class on the body to enable our 'visuallyhidden' class