<address> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:address

Introduction

The address element marks contact information for a document or article element.

The address Element summary

Item Value
Element: address
Local Attributes:None
Contents:Flow content, but the h1-h6, section, header, footer, nav, article, and aside elements may not be used as descendants of this element.
Tag Style: Start and end tags
New in HTML5? Yes
Changes in HTML5 N/A

Style Convention

address {
   display: block;
   font-style: italic;
}

When the address element is a descendant of an article element, it marks contact information for that article.

When an address element is a child of a body element, the address element marks contact information for the entire document.

You can't use address element to mark addresses of customers or users in the content of a document.

Using the address Element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
      <style>
aside { width:40%; background:white; float:right; border: thick solid black; margin-left: 5px;}
aside > section { padding: 5px;}
aside > h1 {background: white; color: black; text-align:center}

      </style> 
   </head> 
   <body> 
      <article> 
         <header> 
            <hgroup> 
               <h1>CSS</h1> 
               <h2>by java2s.com</h2> 
            </hgroup> 
            <address>
                Questions and comments? 
               <a href="mailto:java2s.com@example.com">Email me</a> 
            </address> 
         </header> 
      </article>  
   </body><!-- w w  w  . j  ava 2  s .c o m-->
</html>

Related Tutorials