/

HTML / CSS / JavaScript Tutorial

HTML Element: <address>

[this page | pdf | back links]

The HTML <address> element is usually used to define contact information for the author or owner of a document or file. If it is inside an <article> element then it typically represents contact information for that article. If it is outside an article element but inside a <body> element then it typically represents contact information for the document or page.

 

The attributes it can take are HTML global attributes and HTML event attributes.

 

To create or access such an element in JavaScript see here. The corresponding HTML DOM object supports standard DOM properties and methods. 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>
<address>1, Smith Street, Smith Village</address>

<br><br>Created using JavaScript:<br>
<span id="element"></span>

<script>
var x = document.createElement("ADDRESS");
x.textContent = "1, Smith Street, Smith Village";
// or use var txt = document.createTextNode("1, Smith Street, Smith Village");
// x.appendChild(txt);
document.getElementById("element").appendChild(x);
</script>

</body>
</html>


NAVIGATION LINKS
Contents | Prev | Next | HTML Elements


Desktop view | Switch to Mobile