{"id":2482,"date":"2013-05-15T13:59:08","date_gmt":"2013-05-15T13:59:08","guid":{"rendered":"http:\/\/www.webninjataylor.com\/library\/?p=2482"},"modified":"2014-06-24T21:20:14","modified_gmt":"2014-06-24T21:20:14","slug":"html5-css3-figure-numbering","status":"publish","type":"post","link":"https:\/\/webninjataylor.com\/library\/html5-css3-figure-numbering\/","title":{"rendered":"HTML5 + CSS3: Figure Numbering"},"content":{"rendered":"<pre>&lt;figure&gt;\r\n    &lt;img alt=\"\" src=\"path\/to\/your\/image.jpg\" \/&gt;\r\n    &lt;figcaption&gt;Here is the legend for your image&lt;\/figcaption&gt;\r\n&lt;\/figure&gt;\r\n<\/pre>\n<ul>\n<li><span class=\"code\">counter-reset<\/span> which is used to initialize and reset one or several counters<\/li>\n<li><span class=\"code\">counter-increment<\/span> which is used to increment one or several counters<\/li>\n<li><span class=\"code\">counter()<\/span> is a valid value for ::before and ::after pseudo-elements, accepting a counter name as parameter in order to display its value<\/li>\n<\/ul>\n<pre>.article {counter-reset: figures;}   \/* Initialize counter *\/\r\n\r\n.figure {counter-increment: figures;}   \/* Increment counter *\/\r\n\r\n.figure figcaption:before {content: 'Fig. 'counter(figures) ' - ';}   \/* Display value of counter *\/\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&lt;figure&gt; &lt;img alt=&#8221;&#8221; src=&#8221;path\/to\/your\/image.jpg&#8221; \/&gt; &lt;figcaption&gt;Here is the legend for your image&lt;\/figcaption&gt; &lt;\/figure&gt; counter-reset which is used to initialize and reset one or several counters counter-increment which is used to increment one or several counters counter() is a valid value for ::before and ::after pseudo-elements, accepting a counter name as parameter in order to display [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[19,40],"class_list":["post-2482","post","type-post","status-publish","format-standard","hentry","category-web-shots","tag-css","tag-html"],"_links":{"self":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/2482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/comments?post=2482"}],"version-history":[{"count":6,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/2482\/revisions"}],"predecessor-version":[{"id":3361,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/2482\/revisions\/3361"}],"wp:attachment":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/media?parent=2482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/categories?post=2482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/tags?post=2482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}