JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
<!doctype html>
<html lang="en">
<head>
<title>Google</title>
</head>
<body>
<header>
<div class="website-name">
<h1>Google</h1>
</div>
<div class="account-action">
<a href="#">Sign In</a>
</div>
<div class="google-apps">
<div class="app-shortcuts">
<ul>
<li><a href="#">Gmail</a></li>
<li><a href="#">Images</a></li>
</ul>
</div>
<div class="all-apps">
<div class="first-section-apps">
<div class="menu-text">Menu</div>
<ul>
<li><a href="#">Account</a></li>
<li><a href="#">Search</a></li>
<li><a href="#">Maps</a></li>
<li><a href="#">YouTube</a></li>
<li><a href="#">Play</a></li>
<li><a href="#">News</a></li>
<li><a href="#">Gmail</a></li>
<li><a href="#">Contacts</a></li>
<li><a href="#">Drive</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="#">Google+</a></li>
<li><a href="#">Translate</a></li>
<li><a href="#">Photos</a></li>
</ul>
</div>
<div class="second-section-apps">
<div class="more-text">More</div>
<ul>
<li><a href="#">Docs</a></li>
<li><a href="#">Books</a></li>
<li><a href="#">Hangouts</a></li>
<li><a href="#">Keep</a></li>
<li><a href="#">Earth</a></li>
<li><a href="#">Saved</a></li>
</ul>
</div>
<div class="third-section-apps">
<a href="#">Even more from Google</a>
</div>
</div>
</div>
</header>
<main>
<div class="search">
<div class="search-channels">
<form action="#" class="text-search">
<label>Search</label>
<div class="textbox-skin">
<input type="text">
</div>
<div class="search-actions">
<button class="google-search-button">Google Search</button>
<button class="im-feeling-lucky-button">I'm Feeling Lucky</button>
</div>
</form>
<div class="voice-search">
<a href="#">Search by Voice</a>
</div>
</div>
</div>
<div class="internationalization">
<div class="localization">
<div class="google-offered-in-text">Google offered in:</div> <a href="#">Cebuano</a>
</div>
<div class="current-country-location">
<div class="country-text">Philippines</div>
</div>
</div>
</main>
<footer>
<div class="secondary-navigation">
<ul class="primary">
<li><a href="#">Advertising</a></li>
<li><a href="#">Business</a></li>
<li><a href="#">About</a></li>
</ul>
<ul class="secondary">
<li><a href="#">Privacy</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Settings</a></li>
</ul>
</div>
</footer>
</body>
</html>
* {
/* Visual Design: Colors & Graphic Elements */
box-sizing: border-box;
}
body {
/* Visual Design: Colors & Graphic Elements */
margin: 0;
/* Visual Design: Layout */
display: grid;
grid-template:
'a1 b1'
'a2 b2' 1fr
'a3 b3'
'a4 b4'
'a5 b5'
'a6 b6' 1fr
'a7 b7'
'a8 b8'
/ 1fr;
height: 100vh;
}
header {
/* Visual Design: Layout */
display: contents;
}
main {
/* Visual Design: Layout */
display: contents;
}
footer {
/* Visual Design: Layout */
display: contents;
}
/* Website Name */
.website-name {
/* Visual Design: Layout */
grid-area: a3;
grid-column: a3 / -1;
}
.website-name h1 {
/* Visual Design: Layout */
text-align: center;
}
/* Account Action */
.account-action {
/* Visual Design: Layout */
grid-area: b1;
margin-right: 1rem;
}
.account-action a {
/* Usability: Active Area */
display: inline-block;
padding: .75em 1em;
/* Visual Design: Colors & Graphic Elements */
background-color: blue;
color: white;
text-decoration: none;
border-radius: .125em;
}
.account-action a:hover {
/* Usability: Interactivity */
box-shadow: 0 2px 2px hsla(0, 0%, 0%, .25);
}
.account-action,
.google-apps {
/* Visual Design: Layout */
margin-top: 1rem;
}
/* Google Apps */
.google-apps {
/* Visual Design: Layout */
grid-area: a1;
justify-self: right;
}
.google-apps a {
/* Usability: Active Area */
display: inline-block;
padding: .75em 0;
/* Visual Design: Colors & Graphic Elements */
color: black;
text-decoration: none;
}
.google-apps a:hover {
/* Usability: Interactivity */
text-decoration: underline;
}
.google-apps ul {
/* Visual Design: Colors & Graphic Elements */
list-style: none;
margin: 0;
padding: 0;
}
.app-shortcuts li {
/* Visual Design: Layout */
display: inline-block;
margin: 0 .5rem;
}
.app-shortcuts {
/* Visual Design: Layout */
display: inline-block;
}
.all-apps {
/* Visual Design: Layout */
display: inline-block;
}
.first-section-apps .menu-text {
/* Visual Design: Layout */
display: inline-block;
margin: 0 .5rem;
}
/* Search */
.search {
/* Visual Design: Layout */
grid-area: a4;
grid-column: a4 / -1;
justify-self: center;
margin: auto;
padding: 0 1rem;
width: 100%;
max-width: 480px;
}
.text-search label {
/* Visual Design: Colors & Graphic Elements */
display: none;
}
.text-search input {
/* Usability: Active Area */
margin: 0;
padding: 0 .5em;
font-size: 1em;
/* Visual Design: Colors & Graphic Elements */
background-color: transparent;
border: 0;
/* Visual Design: Layout */
position: relative;
z-index: 1;
width: 100%;
}
.text-search input,
.text-search .textbox-skin:before {
/* Usability: Active Area */
/* Visual Design: Colors & Graphic Elements */
min-height: 44px;
}
.text-search .textbox-skin {
/* Visual Design: Layout */
grid-area: a1;
}
.text-search .textbox-skin:before {
/* Visual Design: Layout */
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
/* Visual Design: Colors & Graphic Elements */
border: 1px solid lightgray;
box-shadow: 0 2px 2px hsla(0, 0%, 0%, .0625);
border-radius: .125em;
}
.text-search .textbox-skin:hover:before {
/* Usability: Interactivity */
box-shadow: 0 2px 4px 1px hsla(0, 0%, 0%, .125);
}
.search-actions {
/* Visual Design: Layout */
grid-area: a2;
grid-column: a2 / -1;
display: flex;
justify-content: center;
}
.search-actions button {
/* Usability: Active Area */
padding: .75em 1em;
min-height: 44px;
/* Visual Design: Colors & Graphic Elements */
background-color: #f2f2f2;
color: gray;
font-size: 1em;
border: 1px solid #e5e5e5;
border-radius: .125em;
/* Visual Design: Layout */
margin: 1rem .5rem;
}
.search-actions .google-search-button {
/* Visual Design: Layout */
margin-left: 0;
}
.search-actions .im-feeling-lucky-button {
/* Visual Design: Layout */
margin-right: 0;
}
.search-actions button:hover {
/* Usability: Interactivity */
background-color: #fafafa;
border-color: lightgray;
box-shadow: 0 2px 2px hsla(0, 0%, 0%, .0625);
}
.voice-search {
/* Visual Design: Layout */
grid-area: b1;
align-self: center;
/* Visual Design: Layout */
position: relative;
z-index: 1;
}
.voice-search a {
/* Usability: Active Area */
display: inline-block;
padding: .75em 0;
}
.search-channels {
/* Visual Design: Layout */
position: relative;
display: grid;
grid-template:
'a1 b1'
'a2 b2'
/ 1fr;
}
.text-search {
/* Visual Design: Layout */
display: contents;
}
/* Internationalization */
.internationalization {
/* Visual Design: Layout */
display: contents;
}
.localization {
/* Visual Design: Layout */
grid-area: a5;
grid-column: a5 / -1;
text-align: center;
}
.localization a {
/* Usability: Active Area */
display: inline-block;
padding: .75em 0;
/* Visual Design: Colors & Graphic Elements */
color: blue;
text-decoration: none;
}
.localization a:hover {
/* Usability: Interactivity */
text-decoration: underline;
}
.google-offered-in-text {
/* Visual Design: Colors & Graphic Elements */
display: inline-block;
}
.current-country-location {
/* Visual Design: Layout */
grid-area: a7;
grid-column: a7 / -1;
padding: 0 .5rem;
/* Visual Design: Colors & Graphic Elements */
background-color: #f2f2f2;
border-top: 1px solid #e5e5e5;
}
.current-country-location .country-text {
/* Visual Design: Layout */
margin: .5em .5rem;
}
/* Secondary Navigation */
.secondary-navigation {
/* Visual Design: Layout */
grid-area: a8;
grid-column: a8 / -1;
padding: 0 .5rem;
/* Visual Design: Colors & Graphic Elements */
background-color: #f2f2f2;
border-top: 1px solid #e5e5e5;
}
.secondary-navigation a {
/* Usability: Active Area */
display: inline-block;
padding: .75em 0;
/* Visual Design: Colors & Graphic Elements */
text-decoration: none;
}
.secondary-navigation a:hover {
/* Usability: Interactivity */
text-decoration: underline;
}
.secondary-navigation ul {
/* Visual Design: Colors & Graphic Elements */
list-style: none;
margin: 0;
padding: 0;
}
.secondary-navigation a {
/* Visual Design: Colors & Graphic Elements */
color: gray;
/* Visual Design: Layout */
margin: 0 .5rem;
}
.secondary-navigation li {
/* Visual Design: Layout */
display: inline-block;
}
/* Temp: Hide Elements */
.first-section-apps ul,
.second-section-apps .more-text,
.second-section-apps ul,
.third-section-apps {
display: none;
}
@media only screen and ( min-width: 35em ) {
.secondary-navigation {
/* Visual Design: Layout */
display: flex;
justify-content: space-between;
}
}
Also see: Tab Triggers