Thursday, May 8, 2014

HTML Lessons part 15

In this lesson I will teach you how to make buttons like this.
To make buttons you need to code it like this.

<button type="button">Click Me!</button>

This will make a normal button.  To make a button like the one at the top you should do a code like this.

<button type="button" onclick="alert('Hello world!')">Click Me!</button>

That one will make it say "Hello world" is a pop up box.  You have to add type="button" for it to know.  You can also make buttons links by putting in the link tag like this.

<a href="https://www.google.com/">
<button type="button">Hi!</button><a/a>

That is all for today!
By the way, check out last post to see how to make moving text like this!

No comments:

Post a Comment