Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                 <header>
        <h1>Aprende HTML</h1>
        <p>Tu guía completa para comenzar con HTML.</p>
    </header>
    <nav>
        <ul>
            <li><a href="#introduccion">Introducción</a></li>
            <li><a href="#estructura">Estructura HTML</a></li>
            <li><a href="#etiquetas">Etiquetas HTML</a></li>
            <li><a href="#ejemplos">Ejemplos</a></li>
        </ul>
    </nav>
    <main>
        <article id="introduccion">
            <h1>Introducción a HTML</h1>
            <p>HTML (HyperText Markup Language) es el lenguaje estándar para crear páginas web. Te permite estructurar el contenido de tu página y agregar elementos como texto, imágenes y enlaces.</p>
        </article>
        <article id="estructura">
            <h1>Estructura HTML</h1>
            <p>Un documento HTML consta de elementos HTML anidados. La estructura básica incluye un elemento <code>&lt;!DOCTYPE html&gt;</code>, <code>&lt;html&gt;</code>, <code>&lt;head&gt;</code> y <code>&lt;body&gt;</code>.</p>
        </article>
        <article id="etiquetas">
            <h1>Etiquetas HTML</h1>
            <p>Las etiquetas HTML son elementos que definen la estructura de una página. Algunas etiquetas comunes incluyen <code>&lt;h1&gt;</code> para encabezados, <code>&lt;p&gt;</code> para párrafos y <code>&lt;a&gt;</code> para enlaces.</p>
        </article>
        <aside>
            <h2>Recursos adicionales</h2>
            <p>Aquí tienes algunos recursos adicionales para aprender más sobre HTML:</p>
            <ul>
                <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML" target="_blank">Documentación de HTML en MDN</a></li>
                <li><a href="https://www.w3schools.com/html/" target="_blank">W3Schools - Tutoriales de HTML</a></li>
                <li><a href="https://htmldesdecero.es/" target="_blank">HTMLdesdecero.es - Tutoriales y guías de HTML</a></li>
            </ul>
        </aside>
    </main>
    <footer>
    </footer>
              
            
!

CSS

              
                /* Estilos generales */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

header {
    background-color: #FF3152;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

header h1 {
    font-size: 2em;
    margin: 0;
}

nav ul {
    background-color: #333;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li {
    display: inline;
    margin-right: 20px;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
}

main {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

article {
    margin-bottom: 20px;
}

article h1 {
    font-size: 1.5em;
}

aside {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px 0;
}

aside h2 {
    color: #333;
    font-size: 1.2em;
    margin-top: 0;
}

              
            
!

JS

              
                
              
            
!
999px

Console