HTML Element: <bdo>
[this page | pdf | back links]
The HTML <bdo> element makes it possible to
override the current text direction.
The attributes
it can take (other than HTML global
attributes and HTML
event attributes) include:
Attribute
|
Description
|
More
|
dir
|
Text direction for
element content
|
Here
|
To create or access such
an element in JavaScript
see here. The
corresponding HTML DOM
object supports standard
DOM properties and methods, and additional properties with the same name and
meaning as the attributes of the underlying HTML element referred to above. The
default style applicable to this element is shown here.
EXAMPLE:
HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Created using HTML:<br>
<bdo dir="rtl">bdo text</bdo>
<br><br>Created using JavaScript:<br>
<span id="element"></span>
<script>
var x = document.createElement("BDO");
x.textContent = "bdo text";
// or use var txt = document.createTextNode("bdo text");
// x.appendChild(txt);
x.setAttribute("dir","rtl")
document.getElementById("element").appendChild(x);
</script>
</body>
</html>
|
NAVIGATION LINKS
Contents | Prev | Next | HTML Elements