10.07.2015 Views

Building the User Interface by Using HTML5: Text, Graphics ... - server

Building the User Interface by Using HTML5: Text, Graphics ... - server

Building the User Interface by Using HTML5: Text, Graphics ... - server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Building</strong> <strong>the</strong> <strong>User</strong> <strong>Interface</strong> <strong>by</strong> <strong>Using</strong> <strong>HTML5</strong>: <strong>Text</strong>, <strong>Graphics</strong>, and Media | 31Figure 2-7<strong>Using</strong> and tagsLICENSED PRODUCT NOT FOR RESALEStrong element applied to “fresh water”Small element applied to copyright line5. Leave <strong>the</strong> editing tool and Web browser open if you’re continuing immediately to <strong>the</strong>next section.New <strong>Text</strong> Elements in <strong>HTML5</strong>New text-related elements in <strong>HTML5</strong> include , , and , alongwith a few o<strong>the</strong>rs. The element creates a command button. When <strong>the</strong> userclicks a command button, a command executes. The element highlights text ona page, similar to <strong>the</strong> highlighting feature in Microsoft Word. The element displaysa machine-readable time and date, such as 10:10 A.M., CST, July 19, 2012, whichis handy for blogs and calendars, and potentially helps search engines provide betterresults when time and date are part of <strong>the</strong> search criteria.CERTIFICATION READYWhich HTML text-relatedelements are new in<strong>HTML5</strong>?2.1Let’s take a look at some of <strong>the</strong> new text elements in <strong>HTML5</strong> along with some examples:• : The command element is used to define a command button that users clickto invoke a command. The command element has many attributes you can use, such astype, label, title, icon, disabled, checked, and radiogroup. For example:• : The mark element is very handy for highlighting text on a page. You could useit on a search results page, for example, or to set off a block of text that you want to drawto <strong>the</strong> reader’s attention. For example:Since I started jogging last fall, I have lost 35 pounds.• : The time element indicates content that is a time or date, which can be mademachine-readable with <strong>the</strong> datetime attribute. The time element defines time on a24-hour clock and a date in <strong>the</strong> Gregorian calendar. One benefit of making times and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!