content-html.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>jQuery Mobile Docs - HTML formatting</title>
  7. <link rel="stylesheet" href="../../jquery.mobile-1.0.1.min.css" />
  8. <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
  9. <script src="../../jquery.js"></script>
  10. <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
  11. <script src="../_assets/js/jqm-docs.js"></script>
  12. <script src="../../jquery.mobile-1.0.1.min.js"></script>
  13. </head>
  14. <body>
  15. <div data-role="page" class="type-interior">
  16. <div data-role="header" data-theme="f">
  17. <h1>HTML Formatting</h1>
  18. <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
  19. </div><!-- /header -->
  20. <div data-role="content">
  21. <div class="content-primary">
  22. <style>
  23. table { width:100%; }
  24. table caption { text-align:left; }
  25. table thead th { text-align:left; border-bottom-width:1px; border-top-width:1px; }
  26. table th, td { text-align:left; padding:6px;}
  27. </style>
  28. <p>The default approach to styling content in jQuery Mobile is simple: Use a light hand. Our goal is to let the browser's native rendering take precedence; we add a bit of padding for more comfortable readability, and use the <a href="../api/themes.html">theming system</a> to apply the font family and colors. </p>
  29. <p>Taking a light hand with content styling gives designers and developers a clean slate to work with, instead of fighting against a lot of complex style overhead.</p>
  30. <h2>Default HTML markup styling</h2>
  31. <p>By default, jQuery Mobile themes use standard HTML styles and sizes for standard markup elements like headers, paragraph content, block quotes, anchor links, standard ordered, unordered and definition lists, and tables &mdash; as shown in the examples below:</p>
  32. <hr>
  33. <h1>H1 Heading</h1>
  34. <h2>H2 Heading</h2>
  35. <h3>H3 Heading</h3>
  36. <h4>H4 Heading</h4>
  37. <h5>H5 Heading</h5>
  38. <h6>H6 Heading</h6>
  39. <p>This is a paragraph that contains <strong>strong</strong>, <em>emphasized</em> and <a href="index.html">linked</a> text. Here is more text so you can see how HTML markup works in content. Here is more text so you can see how HTML markup works in content.</p>
  40. <blockquote>How about some blockquote action with a <cite>cite</cite></blockquote>
  41. <p>This is another paragraph of text so you can see how HTML markup works in content. This is another paragraph of text so you can see how HTML markup works in content. This is another paragraph of text so you can see how HTML markup works in content.</p>
  42. <p>We add a few styles to <code>tables</code> and <code>fieldsets</code> to make them more legible, which are easily overridden with customs styles.</p>
  43. <ul>
  44. <li>Unordered list item 1</li>
  45. <li>Unordered list item 1</li>
  46. <li>Unordered list item 1</li>
  47. </ul>
  48. <ol>
  49. <li>Ordered list item 1</li>
  50. <li>Ordered list item 1</li>
  51. <li>Ordered list item 1</li>
  52. </ol>
  53. <dl title="Definition list">
  54. <dt>Definition term</dt>
  55. <dd>I'm the definition text</dd>
  56. <dt>Definition term</dt>
  57. <dd>I'm the definition text</dd>
  58. </dl>
  59. <table summary="This table lists all the JetBlue flights.">
  60. <caption>Travel Itinerary</caption>
  61. <thead>
  62. <tr>
  63. <th scope="col">Flight:</th>
  64. <th scope="col">From:</th>
  65. <th scope="col">To:</th>
  66. </tr>
  67. </thead>
  68. <tfoot>
  69. <tr>
  70. <td colspan="5">Total: 3 flights</td>
  71. </tr>
  72. </tfoot>
  73. <tbody>
  74. <tr>
  75. <th scope="row">JetBlue 983</th>
  76. <td>Boston (BOS)</td>
  77. <td>New York (JFK)</td>
  78. </tr>
  79. <tr>
  80. <th scope="row">JetBlue 354</th>
  81. <td>San Francisco (SFO)</td>
  82. <td>Los Angeles (LAX)</td>
  83. </tr>
  84. <tr>
  85. <th scope="row">JetBlue 465</th>
  86. <td>New York (JFK)</td>
  87. <td>Portland (PDX)</td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. </div><!--/content-primary -->
  92. <div class="content-secondary">
  93. <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
  94. <h3>More in this section</h3>
  95. <ul data-role="listview" data-theme="c" data-dividertheme="d">
  96. <li data-role="list-divider">Content Formatting</li>
  97. <li data-theme="a"><a href="content-html.html">Basic HTML styles</a></li>
  98. <li><a href="content-grids.html">Layout grids (columns)</a></li>
  99. <li><a href="content-collapsible.html">Collapsible content blocks</a></li>
  100. <li><a href="content-collapsible-set.html">Collapsible sets (accordions)</a></li>
  101. <li><a href="content-themes.html">Theming content</a></li>
  102. </ul>
  103. </div>
  104. </div>
  105. </div><!-- /content -->
  106. <div data-role="footer" class="footer-docs" data-theme="c">
  107. <p>&copy; 2011-2012 The jQuery Project</p>
  108. </div>
  109. </div><!-- /page -->
  110. </body>
  111. </html>