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

              
                <!-- Navigation (Stays on Top) -->
<div class="w3-top w3-bar w3-black">
<a href="#home" class="w3-bar-item w3-button">Home</a>
<a href="#about" class="w3-bar-item w3-button">About</a>
<a href="#members" class="w3-bar-item w3-button">Members</a>
<a href="#contact" class="w3-bar-item w3-button">Contact</a>
</div>

<main class="w3-container w3-padding-xl">
  <div class="w3-panel w3-yellow">
    <h3>Warning!</h3>
    <p>Yellow often indicates a warning that might need attention.</p>
  </div>

  <ul class="w3-ul w3-border">
    <li><h2>Names</h2></li>
    <li>Jill</li>
    <li>Eve</li>
    <li>Adam</li>
  </ul>
  
  <h1 class="w3-center w3-jumbo">About</h1>

  <p>The Pizza Restaurant was founded in blabla by Mr. Italiano in lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
  
  <h1 class="w3-bold">Opening Hours</h1>
  <div class="w3-row">
    <div class="w3-half">
      <p>Mon &amp; Tue CLOSED</p>
      <p>Wednesday 10.00 - 24.00</p>
      <p>Thursday 10:00 - 24:00</p>
    </div>
    <div class="w3-half">
      <p>Friday 10:00 - 12:00</p>
      <p>Saturday 10:00 - 23:00</p>
      <p>Sunday Closed</p>
    </div>
  </div>
  
  <h2 class="w3-border-bottom w3-border-light-grey w3-padding-lg">Contact</h2>
  <p>Lets get in touch and talk about your next project</p>

  <form>
    <input class="w3-input w3-border" type="text" placeholder="Name" required name="Name">
    <input class="w3-input w3-section w3-border" type="text" placeholder="Email" required name="Email">
    <input class="w3-input w3-section w3-border" type="text" placeholder="Subject" required name="Subject">
    <input class="w3-input w3-section w3-border" type="text" placeholder="Comment" required name="Comment">
    <button class="w3-button w3-black w3-section" type="submit">
    SEND MESSAGE
    </button>
  </form>
</main>
              
            
!

CSS

              
                :root {
  --body-font: Verdana, sans-serif;

  --header-font: "Segoe UI", Arial, sans-serif;
  --header-font-weight: 400;
  --header-margin-block: 10px;
  --header-1-size: 2.4rem;
  --header-2-size: 2rem;
  --header-3-size: 1.6rem;
  --header-4-size: 1.3rem;
  --header-5-size: 1.2rem;
  --header-6-size: 1.06rem;
  --jumbo-size: 4.2rem;

  --spacing-md: 8px;
  --spacing-lg: 16px;
  --spacing-xl: 32px;
  --default-padding: var(--spacing-md) var(--spacing-lg);
  
  
  --w3-input-padding: var(--spacing-md);
  --w3-section-margin-block: var(--spacing-lg);
  --panel-margin-block: var(--spacing-lg);
  --panel-padding: 0.01em var(--spacing-lg);
  --container-padding: 0.01em var(--spacing-lg);

  --w3-button-padding: var(--default-padding);
  --w3-bar-padding: var(--default-padding);
  --w3-ul-li-padding: var(--default-padding);
  --w3-ul-li-border: 1px solid #ddd;

  --w3-border: 1px solid #ccc;

  --w3-button-hover-color: #111;
  --w3-button-hover-bg: #ccc;

  --text-light: #fff;
  --text-dark: #111;

  --amber-bg: #ffc107;
  --aqua-bg: #00ffff;
  --blue-bg: #2196f3;
  --light-blue-bg: #87ceeb;
  --brown-bg: #795548;
  --cyan-bg: #00bcd4;
  --blue-gray-bg: #607d8b;
  --green-bg: #4caf50;
  --light-green-bg: #8bc34a;
  --indigo-bg: #3f51b5;
  --khaki-bg: #f0e68c;
  --lime-bg: #cddc39;
  --orange-bg: #ff9800;
  --deep-orange-bg: #ff5722;
  --pink-bg: #e91e63;
  --purple-bg: #9c27b0;
  --deep-purple-bg: #673ab7;
  --red-bg: #f44336;
  --sand-bg: #fdf5e6;
  --teal-bg: #009688;
  --yellow-bg: #ffeb3b;
  --gray-bg: #9e9e9e;
  --light-gray-bg: #f1f1f1;
  --dark-gray-bg: #616161;
  --pale-red-bg: #ffdddd;
  --pale-green-bg: #ddffdd;
  --pale-yellow-bg: #ffffcc;
  --pale-blue-bg: #ddffff;
  --black-bg: #111;
  --white-bg: #fff;
}

html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */
html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section {
  display: block;
}
summary {
  display: list-item;
}
audio,
canvas,
progress,
video {
  display: inline-block;
}
progress {
  vertical-align: baseline;
}
audio:not([controls]) {
  display: none;
  height: 0;
}
[hidden],
template {
  display: none;
}
a {
  background-color: transparent;
}
a:active,
a:hover {
  outline-width: 0;
}
abbr[title] {
  border-bottom: none;
  text-decoration: underline;
  text-decoration: underline dotted;
}
b,
strong {
  font-weight: bolder;
}
dfn {
  font-style: italic;
}
mark {
  background: #ff0;
  color: #000;
}
small {
  font-size: 80%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
figure {
  margin: 1em 40px;
}
img {
  border-style: none;
}
code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}
button,
input,
select,
textarea,
optgroup {
  font: inherit;
  margin: 0;
}
optgroup {
  font-weight: bold;
}
button,
input {
  overflow: visible;
}
button,
select {
  text-transform: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}
legend {
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}
textarea {
  overflow: auto;
}
[type="checkbox"],
[type="radio"] {
  padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}
[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}
/* End extract */

/* Base Styles */

body {
  font-family: var(--body-font);
  line-height: 1.5;
}

:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--header-font);
  font-weight: var(--header-font-weight);
  margin-block: var(--header-margin-block);
}

h1 {
  font-size: var(--header-1-size);
}
h2 {
  font-size: var(--header-2-size);
}
h3 {
  font-size: var(--header-3-size);
}
h4 {
  font-size: var(--header-4-size);
}
h5 {
  font-size: var(--header-5-size);
}
h6 {
  font-size: var(--header-6-size);
}

.w3-jumbo {
  font-size: var(--jumbo-size);
}

.w3-center { text-align: center; }

.w3-bold { font-weight: bold; }

.w3-input {
  padding: var(--w3-input-padding);
  display:block;
  border:none;
  border-bottom:1px solid #ccc;
  width:100%
}

/* Position Styles */

.w3-top,
.w3-bottom {
  position: fixed;
  width: 100%;
  z-index: 1;
}

.w3-top {
  top: 0;
}
.w3-bottom {
  bottom: 0;
}

.w3-row {
  display: flex;
  justify-content: space-between;
}

.w3-half { flex-basis: 50%; }

.w3-container {
  padding: var(--container-padding);
}

.w3-padding {
  padding-block: var(--spacing-md);
}
.w3-padding-lg {
  padding-block: var(--spacing-lg);
}
.w3-padding-xl {
  padding-block: var(--spacing-xl);
}

[class ^= "w3-border"], .w3-border {
  --border-color: #ccc;
  --border-style: 1px solid var(--border-color);
}

.w3-border        { border: var(--border-style); }
.w3-border-top    { border-top: var(--border-style); }
.w3-border-bottom { border-bottom: var(--border-style); }
.w3-border-left   { border-left: var(--border-style); }
.w3-border-right  { border-right: var(--border-style); }

/* Component Styles */

.w3-section {
  margin-block: var(--w3-section-margin-block);
}

.w3-bar {
  display: flex;
}

.w3-bar .w3-bar-item {
  padding: var(--w3-bar-padding);
  width: auto;
  border: none;
  display: block;
  outline: 0;
}

.w3-button {
  border: none;
  display: inline-block;
  padding: var(--w3-button-padding);
  vertical-align: middle;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background-color: inherit;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.w3-button:hover {
  background-color: var(--w3-button-hover-bg);
  color: var(--w3-button-hover-color);
}

.w3-panel {
  margin-block: var(--panel-margin-block);
  padding: var(--panel-padding);
}

.w3-ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.w3-ul li {
  border-bottom: var(--w3-ul-li-border);
  padding: var(--w3-ul-li-padding);
}

.w3-ul li:last-child {
  border-bottom: none;
}


/* Colors */

.w3-black {
  background-color: var(--black-bg);
  color: var(--text-light);
}

.w3-yellow {
  background-color: var(--yellow-bg);
  color: var(--text-dark);
}

.w3-border-light-grey { --border-color: var(--light-gray-bg); }

              
            
!

JS

              
                
              
            
!
999px

Console