{"id":9361,"date":"2022-10-06T05:07:20","date_gmt":"2022-10-06T05:07:20","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9361"},"modified":"2022-10-06T05:07:20","modified_gmt":"2022-10-06T05:07:20","slug":"html-dir-attribute","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/06\/html-dir-attribute\/","title":{"rendered":"HTML dir Attribute"},"content":{"rendered":"\n<p>The HTML\u00a0dir\u00a0attribute specifies the text direction of an element\u2019s content. It is important for enabling\u00a0HTML\u00a0in right-to-left scripts (e.g. Arabic, Hebrew, etc.). Numerous languages are written with these scripts.<\/p>\n\n\n\n<p>You can use this attribute on any\u00a0HTML element. It is a part of the\u00a0Global Attributes.<\/p>\n\n\n\n<p>The&nbsp;dir&nbsp;attribute can have the following values:<\/p>\n\n\n\n<ul><li>ltr: displays the text in left-to-right text direction. It is the default value.<\/li><li>rtl: displays the text in right-to-left text direction.<\/li><li>auto: lets the browser determine the text direction, based on the content.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"syntax-2\">Syntax<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;tag dir=\"ltr|rtl|auto\"&gt;&lt;\/tag&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-span-class-attribute-dir-span-attribute-4\">Example of the HTML&nbsp;dir&nbsp;attribute:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;p dir=\"rtl\"&gt;Example of the HTML \"dir\" attribute:&lt;\/p&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The HTML\u00a0dir\u00a0attribute specifies the text direction of an element\u2019s content. It is important for enabling\u00a0HTML\u00a0in right-to-left scripts (e.g. Arabic, Hebrew, etc.). Numerous languages are written with these scripts. You can use this attribute on any\u00a0HTML element. It is a part of the\u00a0Global Attributes. The&nbsp;dir&nbsp;attribute can have the following values: ltr: displays the text in left-to-right [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[327],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9361"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=9361"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9361\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=9361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=9361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=9361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}