css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

              <ul id="navigation">
  		<li><a href="index.html" accesskey="1">Home</a></li>
  		<li><a href="photo.html" accesskey="2">Photo</a></li>
  		<li><a href="book.html" accesskey="3">Book</a></li>
    <h1>What is the Document Object Model?</h1>
The <abbr title="World Wide Web Consortium">W3C</abbr> defines
 the <abbr title="Document Object Model">DOM</abbr> as:
    <blockquote cite="http://www.w3.org/DOM/">
A platform- and language-neutral interface that will allow programs
 and scripts to dynamically access and update the
 content, structure and style of documents.
It is an <abbr title="Application Programming Interface">API</abbr>
 that can be used to navigate <abbr title="HyperText Markup Language">
HTML</abbr> and <abbr title="eXtensible Markup Language">XML
</abbr> documents.
                  	body {
  font-family: "Helvetica","Arial",sans-serif;
  font-size: 10pt;
abbr {
  text-decoration: none;
  border: 0;
  font-style: normal;
              function addLoadEvent(func){
	var oldonload = window.onload;
	if(typeof window.onload !="function"){
		window.onload = func;
		window.onload = function(){

function displayAbbreviations(){
	if(!document.getElementById || !document.createElement || !document.createTextNode) return false;
	var abbreviations = document.getElementsByTagName("abbr");
	if(abbreviations.length < 1) return false;
	var defs = new Array();
	for(var i = 0;i < abbreviations.length;i++){
		var current_abbr = abbreviations[i];
		if(current_abbr.childNodes.length < 1) continue;
		var definition = current_abbr.getAttribute("title");
		var key = current_abbr.firstChild.nodeValue;
		defs[key] = definition;
	var dlist = document.createElement("dl");
	for(key in defs){
		var definition = defs[key];
		var dtitle = document.createElement("dt");
		var dtitle_text = document.createTextNode(key);
		var ddesc = document.createElement("dd");
		var ddesc_text = document.createTextNode(definition);
	if(current_abbr.childNodes.length < 1) return false;
	var header = document.createElement("h2");
	var header_text = document.createTextNode("Abbreviations");

function displayCitations(){
//	if(!document.getElementsByTagName || !document.getCreateElement || !document.createTextNode) return false;
	var quotes = document.getElementsByTagName("blockquote");
	for(var i = 0;i < quotes.length;i++){
		if(!quotes[i].getAttribute("cite")) continue;
		var url = quotes[i].getAttribute("cite");
		var quoteChildren = quotes[i].getElementsByTagName("*");
		if(quoteChildren.length < 1) continue;
		var elem = quoteChildren[quoteChildren.length - 1];
		var links = document.createElement("a");
		var links_text = document.createTextNode("source");
		var supscript = document.createElement("sup");

function displayAccesskeys(){
	var links = document.getElementsByTagName("a");
	var defs = new Array();
	for(i = 0;i < links.length;i++){
		var current_link = links[i];
		//如果a没有 accesskey属性,则跳出循环
		if(!current_link.getAttribute("accesskey")) continue;
		var key = current_link.getAttribute("accesskey");
		var text = current_link.firstChild.nodeValue;
		defs[key] =text;
	var list = document.createElement("ul");
	for(key in defs){
		var text = defs[key];
		var li = document.createElement("li");
		var li_text = document.createTextNode(key + ":" + text);
	var header = document.createElement("h3");
	var header_text = document.createTextNode("Accesskeys");

🕑 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.
Loading ..................