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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>


<!DOCTYPE html>
<html>
 <head>
   <title>Traval</title>
 </head>
 <body>
  <main id="main-doc">
   <section class="main-section" id="Bei_Jing">
     <header>
         Bei Jing
     </header>
        <p>Bei Jing is the Capital of China, this is a large city.</p>
        <p>There are more than 20 millions people live there.</p>
        <p>There are so many parks and museums, on weekends and holidays always are so many people.</p>
     
     <div id="code1">
       <p><code>h1 {
          font-size: 40px;
         }</code></p>
     </div>
      
     <ul>
       <li>Tian an men</li>
       <li>Gu gong</li>
       <li>Yi he yuan</li>
       <li>Tian tan</li>
     </ul>
     
   </section>
    
   <section class="main-section" id="Shang_Hai">
     <header>
         Shang Hai
     </header>
        <p>Shand Hai is the Second famous city in China.</p>
        <p>There are more than 20 millions people live there.</p>
        <p>There are so many parks and museums, on weekends and holidays always are so many people.</p>
     
     <div id="code2">
       <p><code>const sec = 60;</code></p>
     </div>
     
     <ul>
       <li>Cheng huang miao</li>
       <li>Dong fang ming zhu</li>
       <li>Wai tan</li>
     </ul>
   </section>
    
   <section class="main-section" id="Guang_Zhou">
     <header>
         Guang Zhou
     </header>
        <p>Guang Zhou is the Third famous city in China.</p>
        <p>There are more than 20 millions people live there.</p>
        <p>There are so many parks and museums, on weekends and holidays always are so many people.</p>       
   </section>
    
   <section class="main-section" id="Shen_Zhen">
     <header>
         Shen Zhen
     </header>
        <p>Shen Zhen is the Forth famous city in China, but it is really a very beautiful city.</p>
     
     <ol>
       <li>Window of the World</li>
       <li>Happy harbour</li>
       <li>Children's park</li>
       <li>Sea of the world</li>
       <li>Hong shu lin</li>
       <li>Wongtee plaza</li>
       <li>Lian hua shan</li>
       
     </ol>
        <p>There are the same more than 20 miliions people there, and it's very hot in summer, people like to go to the beach in summer.</p>
        <p>Every weekends and holidays so many people they go to parks and beaches, they really enjoy that. </p>
     
     <div id="code3">
       <p><code>let yearsAlive = 80;</code></p>
     </div>
   </section>
    
   <section class="main-section" id="Da_Lian">
     <header>
         Da Lian
     </header>
        <p>Da Lian is a city in the north, it's also a coastal city.</p>
        <p>There are around 8 millions people there.</p>
        <p>In summer so many people come there and enjoy the sunshine and seafood.</p>
         
       <ul>
         <li>Zoo</li>
         <li>Xing hai plaza</li>
         <li>Lao dong park</li>
       </ul>
         
      <div id="code4">
        <p><code>const X = prompt('Please type a X.');</code></p>
       </div>
     </section>
    
   <section class="main-section" id="Chang_Chun">
     <header>
          Chang Chun
     </header>
        <p>Chang Chun is the captital of JiLin in the northeast of China.</p>
        <p>In winter so many people come here and enjoy snow, also so many people they come to ski.</p>
        <p>People here are very open , they like to make friends and they like drinking.</p>
    </section>
       
    <section class="main-section" id="Nan_Jing">
     <header>
         Nan Jing
     </header>
        <p>Nan Jing is an old city, there are so many old Chinese culture here.</p>
        <p>There are more than 10 miliions people live here.</p>
        <p>Foods in Nan Jing is very delicious very light and nice, a lot of people they like the foods.</p>
      
      <ol>
        <li>Gui hua gao</li>
        <li>Gui hua lian ou</li>
        <li>Yan shui ya</li>
        <li>Ya xie fen si tang</li>
      </ol>
      
      <div id="code5">
        <p><code>img {
            width: 100%;
          }</code></p>
      </div>
     </section>
       
    <section class="main-section" id="Shen_Yang">
     <header>
           Shen Yang
     </header>
         <p>Shen Yang is an old city, it's also cold in winter.</p>
         <p>There are more than 7 miliions people there.</p>
         <p>Foods in Shen Yang is very yummy, tasty and nice.</p>
      
      <div id="code6">
        <p><code><h2>Happy to see you</h2></code></p>
      </div>
      
      <ol>
        <li>SY Gu gong</li>
        <li>Guai po</li>
        <li>Zhong jie</li>
      </ol>
     </section>
    </main>
       
   <nav id="navbar">
     <header class="title">China Travel</header>
     <hr>
     <ul class="nav-L">
       <li><a class="nav-link" href="#Bei_Jing">Bei Jing</a><br></li>
<hr>   
       <li><a class="nav-link" href="#Shang_Hai">Shang Hai</a><br></li>
<hr>
       <li><a class="nav-link" href="#Guang_Zhou">Guang Zhou</a><br></li>
<hr>
       <li><a class="nav-link" href="#Shen_Zhen">Shen Zhen</a><br></li>
<hr>
       <li><a class="nav-link" href="#Da_Lian">Da Lian</a><br></li>
<hr> 
       <li><a class="nav-link" href="#Chang_Chun">Chang Chun</a><br></li>
<hr>  
       <li><a class="nav-link" href="#Nan_Jing">Nan Jing</a><br></li>
<hr>  
       <li><a class="nav-link" href="#Shen_Yang">Shen Yang</a><br></li>
      
     </ul>
    </nav>
   
 </body>
</html>
              
            
!

CSS

              
                body {
  background-color: #ffe4c4;
}

header{
  font-size: 30px;
  font-weight: bold;
}

p {
  font-size: 20px;
}

ul {
  list-style-type: circle;
}

hr {
  width: 100%;
}

#main-doc {
  margin: 0 300px;
  float: right;
}

#code1,
#code2,
#code3,
#code4,
#code5,
#code6 {
    background-color: lightgrey;
    padding: 5px;
    width: 60%;
    margin-left: 0px;
}

#navbar {
  float: left;
  position: fixed;
  border-right: 2px solid black;
  width: 260px;
  margin: 0;
  color: green;
}

ul.nav-L {
    list-style-type: none;
    border-bottom: 2px solid black;
    text-align: center;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;

}

.nav-link{
  color: black;
  text-decoration: none;
  padding: 30px 17px;
  font-size: 25px;
  font-weight: normal;
  text-align: center;
}

.title {
  font-size: 40px;
  padding-top: 20px;
}

@media only screen and (max-width: 480px) {

  nav a {
    float: right;
    width: 20%;
    margin: 0 0 0 5%;
    padding: 25px 0;
    margin-bottom: 0;
  }
  #main-doc {
    width: 80%;
  }
  
}


              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console