Code this Google MLK Animation

Author Profile Picture

The Google homepage is known for its adorable holiday-themed animations. With Martin Luther King day coming up this Monday, we wanted to teach you how to code the famed Google MLK animation.

1. Create an index.html document.

2. Insert this script:

<html lang=en>
<a href=”” target=”_blank”> Gmail</a> <!– link to Gmail –>
<a href=”” target=”_blank”> Images </a> <!– Link to Google Images –>

<a href=”” target=”_blank”><img src=”” width=”30″ height=”30″></a> <!– Google Apps Grid Icon –>
<a href=”” target=”_blank”><img src=”” width=”30 height=”30″></a>
<a href=”” target=”_blank”><img class=”my-photo” src=”” width=”30″ height=”30″> </a>

<div class=”profile”>

<p class=”center”>
<a href=”” target=”_blank”><img src=””></a> <!– Link to the Google logo–>
<br> <!– Page break–>
<br> <!– Page break–>

<input id=”mysearch” name=”searchitem” type=”search” i title=”Search” autofocus /> <!–Search bar with autofocus to make cursor auto flash in text box. i title makes ‘Searh’ appear when hovering mouse over search bar–>

<br> <!–Page break–>
<br> <!–Page break–>

<button type=”button” style=”height:30px; width:120px”>Google Search</button>
<button type=”button” style=”height:30px; width:120px”>I’m Feeling Lucky</button>
<class id=”footer”>
<a href=”httpss://″>Advertising</a>
<a href=””>Business</a>
<a href=””>About</a>

3. Create a style.css document.

4. Insert the style script by toggling onto the CSS tab in the above pen.

5. Create a script.js file.

6. Paste the JavaScript in the JS tab into the script.js file.

7. Done!

Enjoyed this post? Read more from our Blog.