• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Description

The new <button>...</button> element is similar to the <input type="button" /> element (see Chapter 26, “Form Input Elements: HTMLInputElement”). However, the HTMLButtonElement allows you to include markup for rendering the “inside” of the button. The standard HTML button from the <input /> tag allows styled text only (see Chapter 33, “Styling for HTML Elements”). Listing 25.5 shows the contemporary button tag, and its predecessor, the <input type="button" />.

Listing 25.5. Buttons and Button Inputs

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title></title></head>
<body>
<form action="javascript:void(0)">
<p>
<button type="button"><img src="25lst04b.gif" alt="Beaker icon" />Hello World </button>
<br />
<img src="25lst04b.gif" alt="Beaker icon" /><input type="button" value="Hello World" />
</p>
</form>
</body>
</html>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint