{"id":23771,"date":"2019-05-03T21:38:18","date_gmt":"2019-05-03T13:38:18","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=23771"},"modified":"2019-04-30T18:21:33","modified_gmt":"2019-04-30T10:21:33","slug":"html-table-accessibility","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/","title":{"rendered":"How to Improve HTML Table Accessibility with Markup"},"content":{"rendered":"<p>Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely on <strong>screen readers<\/strong> to read out the content in the web pages. The screen readers <strong>interpret the code present on the page<\/strong> and <strong>read out its content to the user<\/strong>.<\/p>\n<p><code>&lt;table&gt;<\/code> is a widely used HTML element to display data in a structured fashion in webpages. Its design ranges from simple ones to complex ones, complete with row headers, merged headers etc.<\/p>\n<p>If a table is not designed with accessibility in mind, it will be difficult for the screen readers to translate the data in complex tables meaningfully for the users. Hence, to make complex HTML tables more easily understandable, for accessibility, we must <strong>ensure that the headers, column groups, row groups, etc. are clearly defined<\/strong>. We\u2019ll see below how this is <strong>achieved in markup<\/strong>.<\/p>\n<h2>The Scope Attribute<\/h2>\n<p>Even for a simple table with <code>&lt;th&gt;<\/code> tag that clearly defines the headers, you can improve its accessibility with the <code>scope<\/code> attribute and not give way to any confusion that may arise from similar types of data in the cells.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl1.jpg\" alt=\"Table 1\" width=\"626\" height=\"92\"><\/figure>\n<pre>&lt;table&gt;\r\n    &lt;tr&gt;\r\n        &lt;th scope=\"col\"&gt;Employee Name&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Employee Code&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Project Code&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Employee Designation&lt;\/th&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;td&gt;John Doe&lt;\/td&gt;\r\n        &lt;td&gt;32456&lt;\/td&gt;\r\n        &lt;td&gt;456789&lt;\/td&gt;\r\n        &lt;td&gt;Director&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;td&gt;Miriam Luther&lt;\/td&gt;\r\n        &lt;td&gt;78902&lt;\/td&gt;\r\n        &lt;td&gt;456789&lt;\/td&gt;\r\n        &lt;td&gt;Deputy Director&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>What does scope attribute do? According to <a href=\"https:\/\/www.w3.org\/TR\/html401\/struct\/tables.html#adef-scope\">W3C<\/a>:<\/p>\n<p class=\"note\"><strong>Note:<\/strong> This attribute specifies the set of data cells for which the current header cell provides header information.<\/p>\n<p>In other words it helps us associate the data cells with their corresponding header cells.<\/p>\n<p>Please note that in the above example you can switch <code>&lt;th&gt;<\/code> for <code>&lt;td&gt;<\/code>. As long as its <code>scope<\/code> has the value <code>col<\/code>, it will be interpreted as the corresponding column\u2019s header.<\/p>\n<p>The <code>scope<\/code> attribute can have any one of these four values; <code>col<\/code>, <code>row<\/code>, <code>rowgroup<\/code>, <code>colgroup<\/code> to refer to a column\u2019s header, a row\u2019s header, a group of columns\u2019 header and a group of rows\u2019 header respectively.<\/p>\n<h2>Complex Tables<\/h2>\n<p>Now let us move on to a more complex table.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl2.jpg\" alt=\"Table 2\" width=\"649\" height=\"123\"><\/figure>\n<p>Above is a table that lists students in a class and their grades in practical and theory for three subjects.<\/p>\n<p>Here is the HTML code for it. The table has used <code>rowspan<\/code> and <code>colspan<\/code> to create merged headers for the data cells.<\/p>\n<pre>&lt;table&gt;\r\n    &lt;tr&gt;\r\n        &lt;th rowspan=\"2\"&gt;Student Name&lt;\/th&gt;\r\n        &lt;th colspan=\"2\"&gt;Biology&lt;\/th&gt;\r\n        &lt;th colspan=\"2\"&gt;Chemistry&lt;\/th&gt;\r\n        &lt;th colspan=\"2\"&gt;Physics&lt;\/th&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;th&gt;Practical&lt;\/th&gt;\r\n        &lt;th&gt;Theory&lt;\/th&gt;\r\n        &lt;th&gt;Practical&lt;\/th&gt;\r\n        &lt;th&gt;Theory&lt;\/th&gt;\r\n        &lt;th&gt;Practical&lt;\/th&gt;\r\n        &lt;th&gt;Theory&lt;\/th&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;th&gt;John Doe&lt;\/th&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A+&lt;\/td&gt;\r\n        &lt;td&gt;B&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A-&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;th&gt;Miriam Luther&lt;\/th&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;C&lt;\/td&gt;\r\n        &lt;td&gt;C+&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A-&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>In the above table, each data cell, that is each of the table cells <strong>displaying the grade<\/strong>, is associated with three pieces of information:<\/p>\n<ul>\n<li>Which student does this grade belong to?<\/li>\n<li>Which subject does this grade belong to?<\/li>\n<li>Is this grade for the Practical or Theory section?<\/li>\n<\/ul>\n<p>Those three information are defined in three different types of header cells structurally and visually:<\/p>\n<ul>\n<li>Student name<\/li>\n<li>Subject name<\/li>\n<li>Practical or theory<\/li>\n<\/ul>\n<p>Let\u2019s define the same for accessibility.<\/p>\n<pre>&lt;table&gt;\r\n    &lt;col&gt;\r\n    &lt;colgroup span=\"2\"&gt;&lt;\/colgroup&gt;\r\n    &lt;colgroup span=\"2\"&gt;&lt;\/colgroup&gt;\r\n    &lt;colgroup span=\"2\"&gt;&lt;\/colgroup&gt;\r\n    &lt;tr&gt;\r\n        &lt;th rowspan=\"2\" scope=\"col\"&gt;Student Name&lt;\/th&gt;\r\n        &lt;th colspan=\"2\" scope=\"colgroup\"&gt;Biology&lt;\/th&gt;\r\n        &lt;th colspan=\"2\" scope=\"colgroup\"&gt;Chemistry&lt;\/th&gt;\r\n        &lt;th colspan=\"2\" scope=\"colgroup\"&gt;Physics&lt;\/th&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;th scope=\"col\"&gt;Practical&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Theory&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Practical&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Theory&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Practical&lt;\/th&gt;\r\n        &lt;th scope=\"col\"&gt;Theory&lt;\/th&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;th scope=\"row\"&gt;John Doe&lt;\/th&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A+&lt;\/td&gt;\r\n        &lt;td&gt;B&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A-&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n        &lt;th scope=\"row\"&gt;Miriam Luther&lt;\/th&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;C&lt;\/td&gt;\r\n        &lt;td&gt;C+&lt;\/td&gt;\r\n        &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;td&gt;A-&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>In the above markup we have added <code>scope<\/code> to cells that contain heading information about the data cells.<\/p>\n<h2>Column Group<\/h2>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl-d1.jpg\" alt=\"Table 3\" width=\"623\" height=\"169\"><\/figure>\n<p>Biology, Chemistry and Physics cells are to be associated with a group of two columns each (Theory & Practical). Just adding <code>colspan=\"2\"<\/code> does not create the column groups, it only indicates that the particular cell is to occupy two cells\u2019 worth of space.<\/p>\n<p>To create columns group you must use <code>colgroup<\/code> and then add the <code>span<\/code> attribute to it indicating how many columns that column group includes.<\/p>\n<p class=\"note\"><strong>Note:<\/strong> You can learn more about <code>col<\/code> and <code>colgroup<\/code> elements in this <a href=\"https:\/\/www.w3.org\/TR\/html401\/struct\/tables.html#h-11.2.4\">W3C documentation<\/a>.<\/p>\n<p>The <code>&lt;th rowspan=\"2\" scope=\"col\"&gt;Student Name&lt;\/th&gt;<\/code> markup with <code>scope=\"col\"<\/code> helps the assistive technology identify that the cells that follow in the same column are names of students.<\/p>\n<p>Similarly, cells like <code>&lt;th colspan=\"2\" scope=\"colgroup\"&gt;Biology&lt;\/th&gt;<\/code> containing <code>scope=\"colgroup\"<\/code> helps users identify that the data in the  cells that follow in the column group it spans over are associated with that particular subject.<\/p>\n<p>Then there is the <code>&lt;th scope=\"row\"&gt;John Doe&lt;\/th&gt;<\/code> markup with <code>scope=\"row\"<\/code> that defines that the cells following it in the same row, containing the \u201cgrade\u201d information regarding that particular student name.<\/p>\n<h2>Row Groups<\/h2>\n<p>Now let us move onto another example, this example will have almost the same table as the one above except we\u2019ll swap row and column headers, so we\u2019ll be able to work with row groups.<\/p>\n<pre>\r\n\t&lt;table&gt;\r\n        &lt;tr&gt;\r\n        &lt;th colspan=\"2\"&gt;Subject&lt;\/th&gt;\r\n        &lt;th&gt;John Doe&lt;\/th&gt;\r\n        &lt;th&gt;Miriam Luther&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;th rowspan=\"2\"&gt;Biology&lt;\/th&gt;\r\n            &lt;th&gt;Practical&lt;\/th&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;           \r\n            &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;            \r\n            &lt;th&gt;Theory&lt;\/th&gt;\r\n            &lt;td&gt;A+&lt;\/td&gt;           \r\n            &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;th rowspan=\"2\"&gt;Chemistry&lt;\/th&gt;\r\n            &lt;th&gt;Practical&lt;\/th&gt;\r\n            &lt;td&gt;B&lt;\/td&gt;           \r\n            &lt;td&gt;C&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;            \r\n            &lt;th&gt;Theory&lt;\/th&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;           \r\n            &lt;td&gt;C+&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;th rowspan=\"2\"&gt;Physics&lt;\/th&gt;\r\n            &lt;th&gt;Practical&lt;\/th&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;           \r\n            &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;            \r\n            &lt;th&gt;Theory&lt;\/th&gt;\r\n            &lt;td&gt;A-&lt;\/td&gt;           \r\n            &lt;td&gt;A-&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/table&gt;\r\n<\/pre>\n<p>Now that we have our sample to work with let us start by creating row groups like we did for the column groups in the previous example.<\/p>\n<p>However, row groups can not be created using a tag like <code>colgroup<\/code> because there is no <code>rowgroup<\/code> element.<\/p>\n<p>HTML rows are generally grouped using <code>&lt;thead&gt;<\/code>, <code>&lt;tbody&gt;<\/code> and <code>&lt;tfooter&gt;<\/code> elements. A single HTML <code>&lt;table&gt;<\/code> element can have one <code>&lt;thead&gt;<\/code>, one <code>&lt;tfoot&gt;<\/code> and multiple <code>&lt;tbody&gt;<\/code>. We\u2019ll use multiple <code>tbody<\/code> in our table to create the row groups, and add the respective scope to header cells.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl3.jpg\" alt=\"Table 4\" width=\"430\" height=\"194\"><\/figure>\n<pre>&lt;table&gt;\r\n    &lt;colgroup span=\"2\"&gt;&lt;\/colgroup&gt;\r\n    &lt;col&gt;\r\n    &lt;col&gt;\r\n    &lt;thead&gt;\r\n        &lt;tr&gt;\r\n            &lt;th colspan=\"2\" scope=\"colgroup\"&gt;Subject&lt;\/th&gt;\r\n            &lt;th scope=\"col\"&gt;John Doe&lt;\/th&gt;\r\n            &lt;th scope=\"col\"&gt;Miriam Luther&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/thead&gt;\r\n    &lt;tbody&gt;\r\n        &lt;tr&gt;\r\n            &lt;th rowspan=\"2\" scope=\"rowgroup\"&gt;Biology&lt;\/th&gt;\r\n            &lt;th&gt;Practical&lt;\/th&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;th&gt;Theory&lt;\/th&gt;\r\n            &lt;td&gt;A+&lt;\/td&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/tbody&gt;\r\n    &lt;tbody&gt;\r\n        &lt;tr&gt;\r\n            &lt;th rowspan=\"2\" scope=\"rowgroup\"&gt;Chemistry&lt;\/th&gt;\r\n            &lt;th&gt;Practical&lt;\/th&gt;\r\n            &lt;td&gt;B&lt;\/td&gt;\r\n            &lt;td&gt;C&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;th&gt;Theory&lt;\/th&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;\r\n            &lt;td&gt;C+&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/tbody&gt;\r\n    &lt;tbody&gt;\r\n        &lt;tr&gt;\r\n            &lt;th rowspan=\"2\" scope=\"rowgroup\"&gt;Physics&lt;\/th&gt;\r\n            &lt;th&gt;Practical&lt;\/th&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;\r\n            &lt;td&gt;A&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        &lt;tr&gt;\r\n            &lt;th&gt;Theory&lt;\/th&gt;\r\n            &lt;td&gt;A-&lt;\/td&gt;\r\n            &lt;td&gt;A-&lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/tbody&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>We have added the rows \u201cPractical\u201d and \u201cTheory\u201d in each <code>tbody<\/code> creating row groups with two rows in each. We also have added the <code>scope=\"rowgroup\"<\/code> to the cells containing the heading information about those two rows (which is the subject name the grades belong to in this case).<\/p>\n<p class=\"note\"><strong>Note:<\/strong> You can look into more about accessibility guidelines in the <a href=\"https:\/\/www.w3.org\/TR\/WCAG20\/\" rel=\"nofollow\">W3C site<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely on screen readers to read out the content in the web pages. The screen readers interpret the code present on the page and read out its content to&hellip;<\/p>\n","protected":false},"author":145,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[3665,506],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Improve HTML Table Accessibility with Markup - Hongkiat<\/title>\n<meta name=\"description\" content=\"Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Improve HTML Table Accessibility with Markup\" \/>\n<meta property=\"og:description\" content=\"Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-03T13:38:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl1.jpg\" \/>\n<meta name=\"author\" content=\"Preethi Ranjit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Preethi Ranjit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/\"},\"author\":{\"name\":\"Preethi Ranjit\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\"},\"headline\":\"How to Improve HTML Table Accessibility with Markup\",\"datePublished\":\"2019-05-03T13:38:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/\"},\"wordCount\":775,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/html-table-accessibility\\\/tbl1.jpg\",\"keywords\":[\"Accessibility Design\",\"HTML\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/\",\"name\":\"How to Improve HTML Table Accessibility with Markup - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/html-table-accessibility\\\/tbl1.jpg\",\"datePublished\":\"2019-05-03T13:38:18+00:00\",\"description\":\"Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/html-table-accessibility\\\/tbl1.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/html-table-accessibility\\\/tbl1.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/html-table-accessibility\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Improve HTML Table Accessibility with Markup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\",\"name\":\"Preethi Ranjit\",\"description\":\"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/preethi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Improve HTML Table Accessibility with Markup - Hongkiat","description":"Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/","og_locale":"en_US","og_type":"article","og_title":"How to Improve HTML Table Accessibility with Markup","og_description":"Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely","og_url":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2019-05-03T13:38:18+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl1.jpg","type":"","width":"","height":""}],"author":"Preethi Ranjit","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Preethi Ranjit","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/"},"author":{"name":"Preethi Ranjit","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3"},"headline":"How to Improve HTML Table Accessibility with Markup","datePublished":"2019-05-03T13:38:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/"},"wordCount":775,"commentCount":10,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl1.jpg","keywords":["Accessibility Design","HTML"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/","url":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/","name":"How to Improve HTML Table Accessibility with Markup - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl1.jpg","datePublished":"2019-05-03T13:38:18+00:00","description":"Web accessibility refers to designing web applications in a way that it can be used with ease by people with visual disabilities. Some of these users rely","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl1.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/html-table-accessibility\/tbl1.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/html-table-accessibility\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Improve HTML Table Accessibility with Markup"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3","name":"Preethi Ranjit","description":"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.","url":"https:\/\/www.hongkiat.com\/blog\/author\/preethi\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-6bp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/23771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/145"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=23771"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/23771\/revisions"}],"predecessor-version":[{"id":47477,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/23771\/revisions\/47477"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=23771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=23771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=23771"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=23771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}