Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/rendering/non-replaced-elements/the-hr-element-0/align.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<link rel="match" href="align-ref.html">
<style>
hr {
width: 100px;
}
</style>
<hr align=>
<hr align=left>
<hr align=center>
<hr align=right>
<hr align=foobar>
<script>
// Test the IDL attribute
const values = ['', 'left', 'center', 'right', 'foobar'];
values.forEach(value => {
const hr = document.createElement('hr');
hr.align = value;
document.body.appendChild(hr);
});
</script>