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

              
                <h1>Google Maps Embed</h1>
<p>Here’s a Google Map</p>
<div id="map-canvas"></div>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyADVtnbKvrQYas4qz_ugtEKhit1bvnH9zQ&amp;sensor=false"></script>
              
            
!

CSS

              
                body { height: 100%; margin: 0; padding-left: 50px; }
#map-canvas { height: 500px; width: 600px; }
              
            
!

JS

              
                function initialize() {
  var myLatLng = new google.maps.LatLng(53.463056, -2.291389);
  var mapOptions = {
    center: myLatLng,
    zoom: 17,
    disableDefaultUI: true,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
  var contentString = '<div id="content">'+
    '<div id="sideNotice"></div>'+
    '<h1 id="firstHeading">Old Trafford</h1>'+
    '<div id="bodyContent">'+
    '<p>Old Trafford is a football stadium in Old Trafford, Greater Manchester, England, and the home of Manchester United. With a capacity of 75,731, Old Trafford is the second-largest football stadium in the United Kingdom after Wembley, and the ninth-largest in Europe.</p>'+
    '</div></div>'
  var infoWindowOptions = {
    content: contentString,
    maxWidth: 400
  };
  var infoWindow = new google.maps.InfoWindow(infoWindowOptions);
  var marker = new google.maps.Marker({
    position: myLatLng,
    map: map,
    title: "Old Trafford"
  })
  google.maps.event.addListener(marker, 'click', function() {
    infoWindow.open(map, marker);
  });
}
google.maps.event.addDomListener(window, 'load', initialize);
              
            
!
999px

Console