Book Image

Developing Windows Store Apps with HTML5 and JavaScript

By : Rami Sarieddine
Book Image

Developing Windows Store Apps with HTML5 and JavaScript

By: Rami Sarieddine

Overview of this book

Windows 8 has already been launched and been installed on millions of devices while the store is getting populated with apps, and soon enough everyone will want a Windows Store app. So start now and learn how to develop apps for Windows 8 using HTML5, CSS3, and JavaScript and you will be killing two birds with one stone by getting introduced to important features in HTML5 and CSS3 at the same time. You will gain the advantage of utilizing your web development skills to transform your website into an app or the other way round. Developing Windows Store Apps with HTML5 and JavaScript is a practical, hands-on guide that covers the basic and important features of a Windows Store App along with code examples which will show you how to develop these features, all the while learning some of the new features in HTML5 and CSS3 which you can utilize in other areas of development. This book starts with the new features in HTML5 and CSS3 that are incorporated with Windows 8 development, and then moves on to creating a blank Windows Store app and add features to it as we move through the chapters till we package the app and make it ready for publishing. Finally, we will have a look at how similar it is to develop the same app with XAML. You will also learn how to add and use new controls dedicated for Windows 8 and then see how to fetch data for the app and bind it to the controls. We will also take a look at making the app adapt to change in screen sizes and rotation as well as how to make the app live with tiles and allow users to sign in using their email accounts. Also you will learn how to add an app bar, and lastly you learn how to finalize the app and publish it. If you want to leverage your web development skills and utilize it in developing for Windows 8, then you came to the right place. Developing Windows Store Apps with HTML5 and JavaScript is packed with examples and screenshots which will make it easy for you to implement all the things you learned throughout the book.
Table of Contents (19 chapters)
Developing Windows Store Apps with HTML5 and JavaScript
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding semantic elements


HTML5 markup is more semantic than its predecessors due to the new semantic elements for describing the structure of the page content. The list of semantic elements includes the following:

  • The <header> tag defines a header for the document or section. It wraps the heading or a group of headings in a page or a section, and it can also contain information such as logos, banners, and main navigation links. You can have multiple <header> tags in a page.

  • The <nav> tag represents the major navigation links. Typically it is bound to the header.

  • The <section> tag wraps related content that can be grouped thematically. A <section> tag can include a <header> and <footer> tag.

  • The <footer> tag represents content about a page or a section, for example, related links, privacy terms, and copyright information. You can have more than one <footer> in a page, and it is same as the <header> tag.

  • The <article> tag represents self-contained content that can be used independent of the document as a whole, for example, a blog entry. <article> and <section> are much alike because both are standalone tags and hold related content; however, if it's content can be syndicated (via an atom or an RSS feed), then the <article> element is more appropriate.

  • The <aside> tag represents the part of a page that is tangentially related to the content around it, and also separate from that content, as it can be removed without affecting the main content of the page. Typical usage can be a sidebar.

  • The <address> tag represents the contact information for the nearest <article> parent element, if present, or the parent <body> element, which in that case applies to the whole document.

Putting all these new elements together in a page would yield the following markup:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Developing for Windows 8</title>
</head>
<body>
  <header>
    <a href="default.html">
      <h1>The Courses</h1>
      <img src="logo.png" alt="Book Logo">
    </a>
    <nav>
      <ul>
        <li><a href="home.html">Home</a></li>
        <li><a href="about.html">About</a></li>
      </ul>
    </nav>
  </header>
  <section>
    <article>
      <h2></h2>
      <p></p>
      <address>
        Written by <a href="mailto:[email protected]">Demo Author</a>.<br>
        Found at: Demo.com <br>
        Address, Street<br>
        UK
      </address>
    </article>
    <article>
      <h2></h2>
      <p>content</p>
    </article>
  </section>
  <aside>
    <h2></h2>
    <ul>
      <li></li>
      <li></li>
      <li></li>
    </ul>
    <p></p>
  </aside>
  <footer>
    <p></p>
    <p>Copyright &copy; 2013 Packt</p>
  </footer>
</body>
</html>