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 | 33This makes sense because you can easily change styles in CSS that apply across a Web page oreven a Web site. Inserting individual styles throughout even a single Web page can be timeconsuming to modify when a change becomes necessary.The following HTML elements are considered deprecated and are not supported in<strong>HTML5</strong> pages:LICENSED PRODUCT NOT FOR RESALE• : Defines acronyms in HTML 4 that can be spoken as if <strong>the</strong>y are a singleword, such as GUI for graphical user interface. Use <strong>the</strong> tag instead.• : Defines an embedded applet. Use <strong>the</strong> tag instead.• : Defines a default font color, font size, or font family for all <strong>the</strong> text in adocument. Use CSS for applying all fonts.• : Makes text bigger relative to <strong>the</strong> current font size. Use CSS instead.• : Center-aligns text and content. Use CSS instead.• : Defines a directory list. Use <strong>the</strong> tag instead.• : Specifies <strong>the</strong> font face, font size, and font color of text. Use CSS instead.• : Defines a particular frame (a window) within a frameset (see <strong>the</strong> nextbulleted item).• : Defines a frameset for organizing multiple frames (windows).• : Displays text for browsers that don’t support frames.• : Defines strikethrough text. Use <strong>the</strong> tag instead for small amounts oftext, or use CSS for large blocks of text.• : Defines teletype or monospaced text. Use <strong>the</strong> tag or CSS instead.Just because an element isn’t supported doesn’t mean it won’t work within certain browsers.Many users still use older versions of browsers, and many deprecated elements render well inthose browsers. However, a best practice is to create pages assuming Web page visitors use acurrent or near-current browser, which means using <strong>the</strong> latest HTML elements. If you knowall of your Web page visitors use an older browser version, it’s acceptable to use deprecatedelements. Regardless, if you need to apply a lot of formatting to any Web page, it’s best to useCSS for efficiency.The following attributes are not used in <strong>HTML5</strong>, although <strong>the</strong>se attributes are not actuallypart of any HTML specification:• bgcolor: Applies a specified background color to whatever content its associatedelement describes, which is usually a table or a page. Use <strong>the</strong> CSS propertybackground-color instead.• bordercolor: Applies a specified color to <strong>the</strong> cell of a table. Use <strong>the</strong> border-colorCSS property instead.• bordercolorlight: Applies a specified color to <strong>the</strong> upper and left corners of a tablecell. Use <strong>the</strong> border-color CSS property instead.• bordercolordark: Applies a specified color to <strong>the</strong> lower and right corners of a tablecell. Use <strong>the</strong> border-color CSS property instead.Like with deprecated elements, you may use <strong>the</strong>se attributes if you know that your Web pagevisitors use older browsers. Be aware that your attempts to validate your Web page will resultin errors, which you can ignore if you’re certain your visitors’ browsers support <strong>the</strong> attributes.✚ MORE INFORMATIONTo find out about new features of <strong>HTML5</strong>, browse <strong>the</strong> “Learn <strong>HTML5</strong> in 5 Minutes!” Web page athttp://msdn.microsoft.com/en-us/hh549253 and <strong>the</strong> W3C “HTML elements” Web page athttp://dev.w3.org/html5/markup/elements.html#elements.

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

Saved successfully!

Ooh no, something went wrong!