{"id":6687,"date":"2019-02-17T18:44:23","date_gmt":"2019-02-17T17:44:23","guid":{"rendered":"https:\/\/www.creativejuiz.fr\/blog?p=6687"},"modified":"2019-09-08T14:50:10","modified_gmt":"2019-09-08T12:50:10","slug":"html-start-reversed-type-attribute-ol-list-element","status":"publish","type":"post","link":"https:\/\/www.creativejuiz.fr\/blog\/en\/tutorials\/html-start-reversed-type-attribute-ol-list-element","title":{"rendered":"Did You Know \u2013 HTML start, reversed and type attributes for OL element"},"content":{"rendered":"<p>When it comes the time to write rich copyrighting, you would love to know more about HTML5 attributes and rules to write accessible and efficient contents. Did you know that <strong>Ordered List<\/strong> (<code>ol<\/code> element) allows you to tweak some default values thanks to HTML attributes? Let&#8217;s find out how.<\/p>\n<p><!--more--><\/p>\n<p>All those attributes has been deprecated in HTML4 but reintroduced in HTML5.<\/p>\n<h2 id=\"start\">The <code>start<\/code> attribute<\/h2>\n<p>The <code>start<\/code> attribute allows you to start a list at a different value than 1. The syntax is quite simple since you only need to write an integer value in this attribute.<\/p>\n<pre class=\"code\"><code class=\"lang-markup\">&lt;ol start=\"3\"&gt;\r\n    &lt;li&gt;Your item&lt;\/li&gt;\r\n    &lt;!-- \u2026 --&gt;\r\n&lt;\/ol&gt;<\/code><\/pre>\n<p>The result is the following:<\/p>\n<ol start=\"3\">\n<li>Item 3<\/li>\n<li>Item 4<\/li>\n<li>Item 5<\/li>\n<\/ol>\n<h2 id=\"reversed\">The <code>reversed<\/code> attribute<\/h2>\n<p>The <code>reversed<\/code> attribute allows you to reverse the counter. It doesn&#8217;t reverse the &#8220;physical&#8221; order of the items, just the counting.<\/p>\n<pre class=\"code\"><code class=\"lang-markup\">&lt;ol reversed=\"true\"&gt;\r\n    &lt;li&gt;Your item&lt;\/li&gt;\r\n    &lt;!-- \u2026 --&gt;\r\n&lt;\/ol&gt;<\/code><\/pre>\n<p>The result is the following:<\/p>\n<ol reversed=\"true\">\n<li>Julie<\/li>\n<li>Steven<\/li>\n<li>Aur\u00e9lien<\/li>\n<\/ol>\n<h2 id=\"type\">The <code>type<\/code> attribute<\/h2>\n<p>The <code>type<\/code> attribute is close to the <a href=\"https:\/\/developer.mozilla.org\/fr\/docs\/Web\/CSS\/list-style-type\"><code>list-style-type<\/code><\/a> property in CSS. The goal of this attribute is to change the numbering type.<\/p>\n<ul>\n<li><code>'a'<\/code> indicates lowercase letters,<\/li>\n<li><code>'A'<\/code> indicates uppercase letters,<\/li>\n<li><code>'i'<\/code> indicates lowercase Roman numerals,<\/li>\n<li><code>'I'<\/code> indicates uppercase Roman numerals,<\/li>\n<li><code>'1'<\/code> indicates numbers (default)<\/li>\n<\/ul>\n<pre class=\"code\"><code class=\"lang-markup\">&lt;ol type=\"I\"&gt;\r\n    &lt;li&gt;Your item&lt;\/li&gt;\r\n    &lt;!-- \u2026 --&gt;\r\n&lt;\/ol&gt;<\/code><\/pre>\n<p>The result is the following:<\/p>\n<ol type=\"I\">\n<li>First Item<\/li>\n<li>Second Item<\/li>\n<li>Third One<\/li>\n<\/ol>\n<p>I still recommend using the CSS property instead of the HTML attribute for maintainability reasons.<\/p>\n<p>More information on <code>ol<\/code> element and attributes on the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/ol\">MDN<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When it comes the time to write rich copyrighting, you would love to know more about HTML5 attributes and rules to write accessible and efficient contents. Did you know that Ordered List (ol element) allows you to tweak some default values thanks to HTML attributes? Let&#8217;s find out how.<\/p>\n","protected":false},"author":4,"featured_media":6693,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bluesky_dont_syndicate":"","_bluesky_syndication_accounts":"","_bluesky_syndication_text":"","footnotes":""},"categories":[647],"tags":[783,782,798,784,781,678],"coauthors":[597],"class_list":["post-6687","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-accessibility","tag-copyrighting","tag-did-you-know","tag-html5-en","tag-list","tag-tips"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/posts\/6687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/comments?post=6687"}],"version-history":[{"count":3,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/posts\/6687\/revisions"}],"predecessor-version":[{"id":6898,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/posts\/6687\/revisions\/6898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/media\/6693"}],"wp:attachment":[{"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/media?parent=6687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/categories?post=6687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/tags?post=6687"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.creativejuiz.fr\/blog\/en\/wp-json\/wp\/v2\/coauthors?post=6687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}