123

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.

            
              <main id="main-doc"> 
  
  
  <nav id="navbar">
  <header class="topic">Lorem Doc</header>
    <a href="#First_Section" class="nav-link">First Section</a>
     <a href="#Second_Section"class="nav-link">Second Section</a>
    <a href="#Third_Section" class="nav-link">Third Section</a>
     <a href="#Fourth_Section" class="nav-link">Fourth Section</a>
    <a href="#Fifth_Section" class="nav-link">Fifth Section</a>
  
    
    
  </nav>
  
  
  <section class="main-section" id="First_Section"><header>First Section</header>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce condimentum arcu sed est rutrum tristique. Proin lobortis elementum augue non egestas. Cras id interdum orci, non convallis arcu. Aenean pretium, velit eget ornare convallis, risus massa accumsan est, vitae sollicitudin nibh tellus eget dui. Aliquam felis erat, elementum ut sagittis quis, dapibus nec dui. Etiam scelerisque arcu eget scelerisque hendrerit. Proin libero erat, fringilla vel tincidunt sit amet, pellentesque nec tortor. Nam dolor neque, volutpat ut imperdiet non, molestie at augue. Donec aliquet id ligula pretium vestibulum. Suspendisse potenti. Sed eu aliquam elit. Vivamus dignissim nisi consectetur scelerisque suscipit. Nulla imperdiet ac augue ut elementum. Duis sem justo, sagittis ac arcu ut, iaculis suscipit metus. Fusce turpis magna, facilisis non dictum vitae, tincidunt quis nulla.</p>
    
    <code>var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}
today =  days[now.getDay()] + ", " +
         months[now.getMonth()] + " " +
         date + ", " +
         (fourdigits(now.getYear())) ;

document.write(today);</code>
    
    
    <p>Pellentesque ullamcorper ex nibh, ut fermentum lectus efficitur non. Vivamus viverra ullamcorper quam, non rhoncus nisl sodales sit amet. Donec rhoncus erat arcu. Phasellus fermentum ex ut augue euismod fermentum. Morbi eget lectus tristique, bibendum leo vitae, facilisis est. Vivamus efficitur eu turpis ut tempus. Nunc magna dolor, sagittis nec lacus consequat, scelerisque lobortis est. Duis nec enim sagittis, tempus erat ac, aliquam orci.</p>
    
    
    
  </section>
  <section class="main-section" id="Second_Section"><header>Second Section</header>
    <p>Proin eget neque ac massa commodo laoreet. Sed nulla sem, auctor sit amet ante vel, cursus pellentesque mi. Aliquam sit amet turpis dui. Donec gravida velit nulla, quis finibus lorem condimentum vel. Morbi eu nisl at leo ornare elementum. Phasellus accumsan magna ut posuere sollicitudin. Vivamus tincidunt felis nisi, vel venenatis nunc volutpat non. Nam odio mi, tincidunt non ultricies non, malesuada ac massa. Praesent vel eros orci.</p> <code> function maxDays(mm, yyyy){
var mDay;
	if((mm == 3) || (mm == 5) || (mm == 8) || (mm == 10)){
		mDay = 30;
  	}
  	else{
  		mDay = 31
  		if(mm == 1){
   			if (yyyy/4 - parseInt(yyyy/4) != 0){
   				mDay = 28
   			}
		   	else{
   				mDay = 29
  			}
		}
  }</code>
    
    
    
  </section>
  <section class="main-section" id="Third_Section"><header>Third Section</header>
   <p> Donec lobortis lorem metus, sit amet vestibulum ante accumsan nec. Aenean ultrices lorem non nisl commodo lacinia. Quisque odio dolor, consequat quis tellus ac, commodo sagittis mauris. Nulla viverra semper placerat. In fermentum dolor vitae luctus interdum. Duis molestie nisi sed augue rhoncus <li> SAMPLE</li>dignissim. Suspendisse laoreet imperdiet diam, a egestas urna congue sed. Quisque ut dolor quis magna molestie gravida.</p>
    
    <code> function changeBg(id){
	if (eval(id).style.backgroundColor != "yellow"){
		eval(id).style.backgroundColor = "yellow"
	}
	else{
		eval(id).style.backgroundColor = "#ffffff"
	}
}</code>
    <li> SAMPLE</li>
    <p>Proin eget neque ac massa commodo laoreet. Sed nulla sem, auctor sit amet ante vel, cursus pellentesque mi. Aliquam sit amet turpis dui. Donec gravida velit nulla, quis finibus lorem condimentum vel. Morbi eu nisl at leo ornare elementum. Phasellus accumsan magna ut posuere sollicitudin. Vivamus tincidunt felis nisi, vel venenatis nunc volutpat non. Nam odio mi, tincidunt non ultricies non, malesuada ac massa. Praesent vel eros orci.</p>
    
  </section>
  <section class="main-section" id="Fourth_Section"><header>Fourth Section</header>
   <p> Aliquam erat volutpat. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla facilisi. Nunc eget risus magna. In eu eleifend nunc. Curabitur id ex lorem. Morbi vitae mauris velit. Donec mi eros, pellentesque vel efficitur vitae, semper quis tortor. Curabitur dui urna, porta non malesuada id, sagittis vel dolor. Proin odio lectus, facilisis non viverra nec, sollicitudin eu nisl. Sed venenatis diam quam, vel blandit ligula consectetur sed.</p> 
   <li> SAMPLE</li>
    <code> function copyit(theField) {
	var selectedText = document.selection;
	if (selectedText.type == 'Text') {
		var newRange = selectedText.createRange();
		theField.focus();
		theField.value = newRange.text;
	} else {
		alert('select a text in the page and then press this button');
	}
}</code>
    
    <li> SAMPLE</li>
    <p>Proin eget neque ac massa commodo laoreet. Sed nulla sem, auctor sit amet ante vel, cursus pellentesque mi. Aliquam sit amet turpis dui. Donec gravida velit nulla, quis finibus lorem condimentum vel. Morbi eu nisl at leo ornare elementum. Phasellus accumsan magna ut posuere sollicitudin. Vivamus tincidunt felis nisi, vel venenatis nunc volutpat non. Nam odio mi, tincidunt non ultricies non, malesuada ac massa. Praesent vel eros orci.</p>
    
  </section>
  <section class="main-section" id="Fifth_Section"><header>Fifth Section</header>
    <p>Pellentesque ullamcorper ex nibh, ut fermentum lectus efficitur non. Vivamus viverra ullamcorper quam, non rhoncus nisl sodales sit amet. Donec rhoncus erat arcu. Phasellus fermentum ex ut augue euismod fermentum. Morbi eget lectus tristique, bibendum leo vitae, facilisis est. Vivamus efficitur eu turpis ut tempus. Nunc magna dolor, sagittis nec lacus consequat, scelerisque lobortis est. Duis nec enim sagittis, tempus erat ac, aliquam orci.</p>
   
    <code> var ip = '<!--#echo var="REMOTE_ADDR"-->';
document.write("Your IP address is" + ip); </code>
    <li> SAMPLE</li>
    <p> 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce condimentum arcu sed est rutrum tristique. Proin lobortis elementum augue non egestas. Cras id interdum orci, non convallis arcu. Aenean pretium, velit eget ornare convallis, risus massa accumsan est, vitae sollicitudin nibh tellus eget dui. Aliquam felis erat, elementum ut sagittis quis, dapibus nec dui. Etiam scelerisque arcu eget scelerisque hendrerit. Proin libero erat, fringilla vel tincidunt sit amet, pellentesque nec tortor. Nam dolor neque, volutpat ut imperdiet non, molestie at augue. Donec aliquet id ligula pretium vestibulum. Suspendisse potenti. Sed eu aliquam elit. Vivamus dignissim nisi consectetur scelerisque suscipit. Nulla imperdiet ac augue ut elementum. Duis sem justo, sagittis ac arcu ut, iaculis suscipit metus. Fusce turpis magna, facilisis non dictum vitae, tincidunt quis nulla.</p>
    <p>Donec lobortis lorem metus, sit amet vestibulum ante accumsan nec. Aenean ultrices lorem non nisl commodo lacinia. Quisque odio dolor, consequat quis tellus ac, commodo sagittis mauris. Nulla viverra semper placerat. In fermentum dolor vitae luctus interdum. Duis molestie nisi sed augue rhoncus dignissim. Suspendisse laoreet imperdiet diam, a egestas urna congue sed. Quisque ut dolor quis magna molestie gravida.
<li> SAMPLE</li>
Aliquam erat volutpat. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
    
  </section>

  









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


            
          
!
            
              #navbar{
position: fixed;
	top: 10px;
	height: 0px;
    margin: 2px; 
    padding-top: 20px; 
  left:10;
}
@media screen and (max-width: 1260px) {
  #navbar {
    width:100%;
    max-height:350px;
    position:fixed;
    top:0;
    left:0;
    margin:0;
    padding:0;
    z-index:1;
  }
            
          
!
999px
🕑 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.

Console