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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <body>
<nav id="navbar">
  <header>Python Begginers Documentaion </header>
  <ul>
    <li> <a class="nav-link" href="#Python_Introduction">Python Introduction</a></li>
   
  
    <li> <a class="nav-link" href="#What_can_Python_do_?">What can Python do ?</a> </li>
   
  
    <li> <a class="nav-link" href="#Why_Python?">Why Python?</a> </li>
  
    <li><a class="nav-link" href="#Good_to_know">Good to know</a> </li>

   <li>   <a class="nav-link" href="#Python_Syntax_compared_to_other_programming_languages">Python Syntax compared to other programming languages</a></li>
  </ul>
  </nav>

<main id="main-doc">      
  <section class="main-section" id="Python_Introduction">
    <header>Python Introduction</header>
    <p>What is Python ? <p>
    <p>
    Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.

      It is used for: </p>
      <ul>
        <li>web development (server-side), </li>
        <li>software development, </li>
        <li>mathematics, </li>
        <li>system scripting. </li>
    </ul>
      
     </section>
  <section class="main-section" id="What_can_Python_do_?">
    <header>What can Python do ?</header>
    <p>Python can be used on a server to create web applications.
 </p>
    <p>Python can be used alongside software to create workflows.
 </p>
    <p>Python can connect to database systems. It can also read and modify files.
 </p>
    <p>Python can be used to handle big data and perform complex mathematics.
 </p>
    <p>Python can be used for rapid prototyping, or for production-ready software development.
 </p>
    </section>

  <section class="main-section" id="Why_Python?">
    <header>Why Python?</header>
          <ul>
        <li>Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
</li>
        <li>Python has a simple syntax similar to the English language. </li>
        <li>Python has syntax that allows developers to write programs with fewer lines than some other programming languages. </li>
        <li>Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick. </li>
            <li>Python can be treated in a procedural way, an object-oriented way or a functional way.
 </li>
    </ul>
    </section>
   <section class="main-section" id="Good_to_know">
     <header>Good to know</header>
     <p>The most recent major version of Python is Python 3, which we shall be using in this tutorial.</p><p> However, Python 2, although not being updated with anything other than security updates, is still quite popular.</p> 
    </section>
   <section class="main-section" id="Python_Syntax_compared_to_other_programming_languages" >
     <header>Python Syntax compared to other programming languages</header>
     <ul>
       <li>Python was designed for readability, and has some similarities to the English language with influence from mathematics.
 </li>
       <li>Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.
 </li>
       <li>Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose.
 </li>
     </ul>
     <div id="downdiv">
       <h2>Example </h2>
       <code>print("Hello, World!")</code>
       <code>if 5 > 2:
  print("Five is greater than two!") </code>
       <code>#This is a comment
print("Hello, World!") </code>
       <code>thistuple = ("apple", "banana", "cherry")
print(thistuple) </code>
       <code>x = 5
y = "John"
print(x)
print(y) </code>
      </div>
    </section>
  </main>
</body>
              
            
!

CSS

              
                html,
body {
  min-width: 290px;
  color: #121212;
  background-color: #F2F2F2;
  font-family: 'Open Sans', Arial, sans-serif;
  line-height: 1.2;
}

#navbar {
  position: fixed;
  min-width: 270px;
  top: 0px;
  left: 0px;
  width: 300px;
  height: 100%;
  border: solid;
  border-color: #AAAAAA;
  background-color: #D2D2D2;
  
}

header {
  color: #080808;
  margin: 10px;
  text-align: center;
  font-size: 1.8em;
  font-weight: thin;
}

#main-doc header {
  text-align: left;
  margin: 0px;
}

#navbar ul {
  height: 88%;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

#navbar li {
  color: #4d4e53;
  border: 1px solid;
  list-style: none;
  position: relative;
  width: 100%;
}

#navbar a {
  display: block;
  padding: 10px 30px;
  color: #4d4e53;
  text-decoration: none;
  cursor: pointer;
}

#main-doc {
  position: absolute;
  margin-left: 310px;
  padding: 60px 20px 20px 20px ;
  margin-bottom: 110px;
}

section {
  color: #4d4e53;
  margin: 15px;
  font-size: 0.96em;
}

section li {
  margin: 15px 0px 0px 20px;
}

code {
  display: block;
  text-align: left;
  white-space: pre-line;
  position: relative;
  word-break: normal;
  word-wrap: normal;
  line-height: 2;
  background-color: #fFF;
  padding: 15px;
  margin: 10px;
  border-radius: 20px;
}

@media only screen and (max-width: 815px) {
  /* For mobile phones: */
  #navbar ul {
    height: 230px;
  }

  #navbar {
    background-color: #AAAAAA;
    position: absolute;
    top: 0;
    padding: 0;
    margin: 0px 0px 100px 0px;
    width: 100%;
    max-height: 320px;
    border: none;
    z-index: 1;
  
  }

  #main-doc {
    position: relative;
    margin-left: 0px;
    margin-top: 270px;
  }
}

@media only screen and (max-width: 400px) {
  #main-doc {
    margin: -10px;
    
  }
#navbar {  max-height: 320px;
z-index:2;}
}
  code {
    margin-left: -20px;
    width: 100%;
    padding: 15px;
    padding-left: 10px;
    padding-right: 45px;
    min-width: 233px;
  }

}

              
            
!

JS

              
                //Python_Introduction
//What_can_Python_do_?
//Why_Python?
//Good_to_know //Python_Syntax_compared_to_other_programming_languages
              
            
!
999px

Console