HTML5 study Note 1: adds a subject structure element and html5 Study Notes

Source: Internet
Author: User

HTML5 study Note 1: adds a subject structure element and html5 Study Notes

Dreamweaver shortcut: attribute panel: Ctrl + F3 new document: Ctrl + N select to view on the webpage: F12

New body structure elements:

Section element (example ):

<! Doctype html>

<Html>

<Body>

<Section>

<H2> section element usage

<P> the section element is used to block content on pages of a website or application. </P>

</Section>

</Body>

</Html>

Article element (example ):

<!Doctype html>

<Html>

<Body>

<Article>

<Header>

<H1> apple tutorial

<P> time: <time pubdate = "pubdate"> 2013-2-1 </time> </p>

</Header>

<P> easy to learn about apple tutorials </p>

<A href = "http://www.apple.com"> www.apple.com </a> <br/>

<Footer>

<P> <small> bottom copyright: owned by apple.com </small> </p>

</Footer>

</Article>

</Body>

</Html>

Nesting of article elements (for example ):

<! Doctype html>

<Html>

<Body>

<Article>

<Header>

<H1> nesting of article elements

<P> publication date: <time pubdate = "pubdate"> 2012/10/10 </time> </p>

</Header>

<P> what is the article element? How to Use the article element ?...... </P>

<Section>

<H2> comment

<Article>

<Header>

<H3> Sender: Unique

<P> <time pubdate datetime = "2011-12-23T: 21-26:00"> 1 hour ago </time> </p>

</Header>

<P> This article is very good! </P>

</Article>

<Article>

<Header>

<H3> Sender: Unique

<P> <time pubdate datetime = "2013-2-20 T: 21-26:00"> 1 hour ago </time> </p>

</Header>

<P> This article is good. </p>

</Article>

</Section>

</Article>

</Body>

</Html>

Aside element (example ):

<! DOCTYPE html>

<Html>

<Head>

<Title> title file </title>

<Link rel = "stylesheet" href = "mystyles.css"> <! -- The rel attribute indicates that the linked document is a style sheet, and the rel attribute specifies the relationship between the current document and the linked document -->

</Head>

<Body>

<Header>

<H1> site title

</Header>

<Nav> <! -- <Nav> label-defined navigation link -->

<Ul>

<Li> Home page </li>

<Li> image </li>

<Li> audio </li>

</Ul>

</Nav>

<Section>

</Section>

<Aside>

<Blockquote> Article 1 </blockquote>

<Blockquote> Article 2 </blockquote>

</Aside>

</Body>

</Html>

Nav element (example ):

<! DOCTYPE html>

<Html>

<Body>

<H1> Time element

<P id = "p1">

<Time datetime = "2013-3-17"> Today is July 17, March 17, 2013 </time>

</P>

<P id = "p2">

<Time datetime = "2013-3-17T17: 00"> the current time is, January 1, March 17, 2013 </time>

<P>

<P id = "p3">

<Time datetime = "2013-12-31"> new winter clothes will be available at the end of this year </time>

</P>

<P id = "p4">

<Time datetime = "2013-3-15" pubdate = "true"> This message was published on July 15, March 15, 2013. </time>

</P>

</Body>

</Html>

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.