w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



html dir attribute

The dir attribute on the html element:

Examples

<htmlattribute="value(s)">...<⁄html>example
6.dir=ltr, rtl, auto<html dir="ltr"> ... <⁄html>
<html dir="rtl"> ... <⁄html>
<html dir="auto"> ... <⁄html>

Video demonstration html dir attribute

HTML5 html dir attribute Tutorial

min video details
00:02 launch dir.php file in browser
00:04 open dir.php file in Notepad++
00:12 dir attribute's values: ltr, rtl, auto
00:17 a) dir attribute, value: ltr, applied on html starting tag
00:21 saving the modifications in Notepad++ and refreshing the file in browser
00:25 testing: <html dir="ltr">
00:25 result: the whole content's directionality is: ltr (letf-to-right)
00:27 b) dir attribute, value: rtl, applied on html starting tag
00:31 saving the modifications in Notepad++ and refreshing the file in browser
00:33 testing: <html dir="true">
00:33 result: the directionality of the whole page's content is: rtl (right-to-left)
00:37c) dir attribute, value: auto, applied on html starting tag
00:42 saving the modifications in Notepad++ and refreshing the file in browser
00:44testing: <html dir="auto">
00:44 result: text's directionality is unknown; the browser decides
html intro html optional html occurrences html browser display html children html syntaxhtml manifest attribute introappcache CACHE sectionappcache NETWORK sectionappcache FALLBACK sectionappcache ADVANTAGESappcache DISADVANTAGEappcache fixes: 1aappcache fixes: 1bappcache fixes: 2aappcache fixes: 2bappcache fixes: 2cappcache fixes: 3html class attributehtml contenteditable attributehtml contextmenu attributehtml hidden attributehtml id attributehtml lang attributehtml spellcheck attributehtml style attributehtml title attributehtml translate attribute