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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<link href="https://fonts.googleapis.com/css?family=Work+Sans" rel="stylesheet">


<div id="page-wrapper">
  <nav id="navbar">
    <header>Markdown Documentation</header>
    <ul>
      <li><a href="#Introduction" class="nav-link">Introduction</a></li>
      <li><a href="#Text" class="nav-link">Text</a></li>
      <li><a href="#Header" class="nav-link">Header</a></li>
      <li><a href="#List" class="nav-link">List</a></li>
      <li><a href="#Images" class="nav-link">Images</a></li>
      <li><a href="#Link" class="nav-link">Link</a></li>
      <li><a href="#Code" class="nav-link">Code</a></li>
    </ul>
  </nav>
  <main id="main-doc">
    <section id="Introduction" class="main-section">
      <header>Introduction</header>
      <p>Markdown is a lightweight and easy-to-use syntax for that any content editing platform can utilize.</p>
      <p>Markdown is a way to style text on the web. You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text
        with a few non-alphabetic characters thrown in, like # or .</p>
      <h3>
        Why to use markdown
      </h3>
      <ul>
        <li>Simple and yet intiutive synatx</li>
        <li>Easy to learn and use</li>
        <li>No prior coding experience is needed</li>
      </ul>
    </section>
    <section class="main-section" id="Text">
      <header id="Text">Text</header>
      <p>Whenever you want to write some paragraph, all you have to do is just write them. It is as simple as that.</p>
      <div class="code">
        <code>
        I am writing a text.
        </code>
      </div>
      <div class="example">
        <div class="content">
          <p>I am writing a text</p>
        </div>
      </div>
    </section>
    <section id="Header" class="main-section">
      <header>Header</header>
      <p>Creating a heading of various level is simple as well. All you have to use is <code>#</code></p>
      <div class="code">
        <code>
            <p># Heading 1</p>
            <p>## Heading 2</p>
            <p>### Heading 3</p>
          </code>
      </div>
      <div class="example">
        <div class="content">
          <h1>Heading 1</h1>
          <h2>Heading 2</h2>
          <h3>Heading 3</h3>
        </div>
      </div>
    </section>
    <section class="main-section" id="List">
      <header>List</header>
      <p>You can create numeric and bullet points with the help of <code>1.</code> and <code>*</code></p>
      <div class="code">
        <code>
          <p>Bullet points</p>
          <p>* Hello</p>
          <p>* World</p>
          <p>Numeric list item</p>
          <p>1.Hello</p>
          <p>1.Hello</p>
        </code>
      </div>
      <div class="example">
        <div class="content">
          <p>Bullet points</p>
          <ul>
            <li>Hello</li>
            <li>World</li>
          </ul>
          <p>Numberic list items</p>
          <ol>
            <li>Hello</li>
            <li>World</li>
          </ol>
        </div>
      </div>
    </section>
    <section class="main-section" id="Images">
      <header>Images</header>
      <p>Loading an image is as simple as below</p>
      <div class="code">
        <code>
          <p>Here is an image for you.</p>
          ![Cat](https://octodex.github.com/images/yaktocat.png)
        </code>
      </div>
      <div class="example">
        <div class="content">
          <p>Here is an image for you.</p>
          <img src="https://octodex.github.com/images/yaktocat.png" alt="Cat">
        </div>
      </div>
    </section>
    <section class="main-section" id="Link">
      <header>Link</header>
      <p>Creating an link is super easy. All you have to do is throw in a text and an url with [text](url)</p>
      <div class="code">
        <code>
          [Github](http://github.com)
        </code>
      </div>
      <div class="example">
        <div class="content">
          <a href="http://github.com">Github</a>
        </div>
      </div>
    </section>
    <section class="main-section" id="Code">
      <header>Code</header>
      <p>You can create a Creating a code block with a help of <code>```</code></p>
      <div class="code">
        <code>
          <p>```javascript</p>
          <p>function sayHello() {</p>
          <p>&nbsp;&nbsp;console.log("Hello world!");</p>
          <p>}</p>
          <p>sayHello();</p>
          <p>```</p>
        </code>
      </div>
      <div class="example">
        <div class="content">
          <code>
  function sayHello() {
    console.log("Hello world!");
  }
  sayHello();
          </code>
        </div>
      </div>
    </section>
  </main>
</div>
              
            
!

CSS

              
                body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
}
header  {
  font-size: 2rem;
}
nav {
  max-height: 25vh;
  overflow: scroll;
  padding-left: 0;
  margin-left: 0;
  border-bottom: 2px solid black;
  margin-bottom: 1rem;
}
nav header{
  padding: 1rem;
  border-bottom: 1px solid black;
}
nav a {
  text-decoration: none;
  padding-left: 1rem;
}
nav li {
  list-style-type: none;
  margin: 0;
  padding: 0.5rem 1rem;
  text-align: left;
  border-bottom: 1px solid black;
}
nav ul {
  margin: 0;
  padding: 0;
}
main {
  width: 90%;
  margin: auto;
}
.code {
  position: relative;
}
.code code {
  display: block;
  padding: 2rem;
  margin: 1rem;
  width: 80%;
  background-color: #c3c3c3;
  box-shadow: 0 0 25px 1px rgba(0, 0, 0, .1);
}
.code code::after {
  content: "Code";
  padding: 0.25rem;
  position: absolute;
  top: 0px;
  width: 80%;
  left: 1.5rem;
  font-weight: bold;
}
.example {
  position: relative;
}
.example::after {
  content: "Rendered Markdown";
  padding: 0.25rem;
  position: absolute;
  top: 0px;
  background-color: #c3c3c3;
  width: 80%;
  left: 1.5rem;
  font-weight: bold;
}
.example .content {
  padding: 2rem;
  box-shadow: 0 0 25px 1px rgba(0, 0, 0, .1);
  width: 80%;
  margin: 1rem;
}

.example img {
  width: 100%;
}

.example code {
  display: block;
  text-align: left;
  white-space: pre;
  line-height: 2;
  background-color:#f7f7f7;
  padding:15px;
  margin:5px;
  border-radius:5px;
}

@media (min-width: 768px) {
  #page-wrapper {
    display: flex;
    flex-direction: row;
  }
  nav {
    flex-basis: 16rem;
    flex-shrink: 0;
    max-height: 100%;
    border-right: 1px solid black;
    border-bottom: 0px;
  }
  main {
    flex-basis: 70%;
    padding: 1rem;
  }
}
              
            
!

JS

              
                // coded by @ChaituVR 
const projectName = 'technical-docs-page';
localStorage.setItem('example_project', 'Technical Docs Page');


              
            
!
999px

Console