Click here to Skip to main content
15,885,767 members
Articles / Web Development / HTML5

HTML5 Quick Start Web Application

Rate me:
Please Sign up or sign in to vote.
4.91/5 (105 votes)
15 Feb 2013CPOL11 min read 363.2K   11.8K   239  
HTML5 self learning center - Explore and understand the new features!
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DeviceSupport.aspx.cs" Inherits="HTML5Samples.NavigateTo.DeviceSupport" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <nav class="breadcrumb">
      <a></a> ->
      <a href="TableOfContents.aspx" rel="up">Table of Contents</a> ->
      <a>Device Support</a>      
    </nav>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>
    Device Support
</h2>
<h4>Key to Mobile page optimization</h4>
<p>
    <ul>
        <li>Viewport Meta Tag - Controls browsers page display <a class="toggleNextElement">[...]</a>
            <ul class="toggleMeNoMargin">            
                <li><code>width</code></li>
                <li><code>height</code></li>
                <li><code>initial-scale</code></li>
                <li><code>minimum-scale</code></li>
                <li><code>maximum-scale</code></li>
                <li><code>user-scalable</code></li>
                <li>Sample :
                    <pre class="code">                                
    &lt;meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes"/&gt;         
                    </pre>
                </li>
            </ul>            
        </li>        
        <li>CSS Media Queries - Media based style <a class="toggleNextElement">[...]</a>
            <ul class="toggleMeNoMargin">     
                <li>External stylesheet :
                    <pre class="code">  
    &lt;link rel="stylesheet"  media="handheld, only screen and (max-device-width: 320px)" href="phone.css"&gt;
    &lt;link rel="stylesheet"  media="only screen and (min-width: 641px) and (max-width: 800px)" href="ipad.css"&gt;
                    </pre>
                </li>
                <li>Within the &lt;style&gt; element (or in css file) as a media rule:
                    <pre class="code">      
    &lt;style&gt;
      @media only screen and (max-width: 480px){
        /* rules defined inside here are only applied to browsers that support CSS media queries and the browser window is 480px or smaller */
      }
    &lt;/style&gt;
                    </pre>
                </li>
                <li>Imported stylesheet within the <code>&lt;style&gt;</code> element:
                    <pre class="code">      
    @import "smallscreen.css" only screen and (max-width: 480px);
                    </pre>
                </li>
            </ul>
        </li>        
    </ul>
</p>
</asp:Content>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Intuit India
India India


A software professional for more than 17+ years building solutions for Web and Desktop applications.

Currently working at Intuit India.

Website: Learn By Insight
Github: Sandeep Mewara
LinkedIn: Sandeep Mewara

Strongly believe in learning and sharing knowledge.



Comments and Discussions