bodyèŠçŽ htmlèŠçŽ ã®2çªç®ã®èŠçŽ ãšããŠãonafterprintonbeforeprintonbeforeunloadonhashchangeonmessageonofflineononlineonpagehideonpageshowonpopstateonstorageonunloadbodyèŠçŽ å
ã®æåã®ãã®ãç©ºçœæåãŸãã¯ã³ã¡ã³ãã§ãªãå ŽåãbodyèŠçŽ ã®éå§ã¿ã°ã¯çç¥ããŠãããããã ããbodyèŠçŽ å
ã®æåã®ãã®ãmetaãlinkãscriptãstyleããŸãã¯templateã§ããå Žåãé€ãã bodyèŠçŽ ã®çŽåãã³ã¡ã³ãã§ãªãå ŽåãbodyèŠçŽ ã®çµäºã¿ã°ã¯çç¥ããŠããããdocumentããŒã« ïŒããã©ã«ã - ç«¶èšå®ããªãïŒãapplicationãaria-*屿§ãinterface HTMLBodyElement : HTMLElement {
};
HTMLBodyElement implements WindowEventHandlers;
bodyèŠçŽ ã¯ãææžã®ã³ã³ãã³ãã衚ãã
é©åææžã§ã¯ã1ã€ã®bodyèŠçŽ ã®ã¿ãååšãããdocument.bodyIDL屿§ã¯ãææžã®bodyèŠçŽ ã«ç°¡åã«ã¢ã¯ã»ã¹ã§ããã¹ã¯ãªãããæäŸããã
äžéšã®DOMæäœã¯ã"bodyèŠçŽ "ãšããçšèªã§å®çŸ©ããããããã¯çšèªã®å®çŸ©ã«åŸã£ãŠãDOMã«ãããç¹å®ã®èŠçŽ ãåç
§ããä»»æã®bodyèŠçŽ ãåç
§ããªãã
bodyèŠçŽ ã¯ãWindowãªããžã§ã¯ãã®ã€ãã³ããã³ãã©ã®æ°ãã€ãã³ããã³ãã©ã³ã³ãã³ã屿§ãšããŠå
¬éããããŸãããããã®ã€ãã³ããã³ãã©IDL屿§ãåæ ããã
bodyèŠçŽ ã§å
¬éãããWindowãªããžã§ã¯ãã®onblurãonerrorãonfocusãonloadãonresizeããã³onscrollã€ãã³ããã³ãã©ã¯ãéåžžHTMLèŠçŽ ã«ãã£ãŠãµããŒããããåãååããã€æ±çšã€ãã³ããã³ãã©ã«åã£ãŠä»£ããã
ãããã£ãŠãããšãã°ãDocumentã®bodyèŠçŽ ã®åã§éåºãããããåºãerrorã€ãã³ãã¯ãèŠçŽ ã®onerrorã€ãã³ããã³ãã©ã³ã³ãã³ã屿§ãæåã«ãããããããããã«ãŒãhtmlèŠçŽ ã®ã€ãã³ããã³ãã©ã³ã³ãã³ã屿§ããã®åŸã«bodyèŠçŽ ã®onerrorã€ãã³ããã³ãã©ã³ã³ãã³ã屿§ãããããã ãããããã¯ãã€ãã³ããã¿ãŒã²ãããããbodyãhtmlãDocumentãWindowãããã³bodyã§ãªãWindowãèŠãŠããbodyäžã®ã€ãã³ããã³ãã©ãžããåºãããã§ãããããããã€ãã³ããbodyãéããŠããåºãããã€ã€ãã³ããWindowãªããžã§ã¯ãã«å°éããªãå ŽåãaddEventListener()ã䜿çšããbodyã«å±ããéåžžã®ã€ãã³ããªã¹ããŒãå®è¡ãããã ããã
ãã®ããŒãžã¯ããŠãŒã¶ãŒããªã³ã©ã€ã³ã§ãããã©ããã衚瀺ããã€ã³ãžã±ãŒã¿ãŒãæŽæ°ããïŒ
<!DOCTYPE HTML>
<html>
<head>
<title>Online or offline?</title>
<script>
function update(online) {
document.getElementById('status').textContent =
online ? 'Online' : 'Offline';
}
</script>
</head>
<body ononline="update(true)"
onoffline="update(false)"
onload="update(navigator.onLine)">
<p>You are: <span id="status">(Unknown)</span></p>
</body>
</html>
articleèŠçŽ mainèŠçŽ ãåå«ã«ãããªããarticle ïŒããã©ã«ã - èšå®ããªãïŒã applicationãdocumentãŸãã¯mainãaria-*屿§ãHTMLElementã䜿çšãããarticleèŠçŽ ã¯ãææžãããŒãžãã¢ããªã±ãŒã·ã§ã³ããŸãã¯ãµã€ãã®äžã§å®å
šãããã¯èªå·±å®çµããæ§é ã衚ããããã¯ååãšããŠãããšãã°ã·ã³ãžã±ãŒã·ã§ã³ãªã©ãç¬ç«ããŠé
åžå¯èœãªãŸãã¯åå©çšå¯èœãªãã®ã§ãããããã¯ããã©ãŒã©ã ã®æçš¿ãéèªãæ°èã®èšäºãããã°ã®ãšã³ããªããŠãŒã¶ãŒã®æçš¿ã³ã¡ã³ããã€ã³ã¿ã©ã¯ãã£ããªãŠã£ãžã§ãããã¬ãžã§ããããŸãã¯ã³ã³ãã³ãã®ä»»æã®ç¬ç«ããé
ç®ã§ãããããããªãã
articleèŠçŽ ããã¹ããããå Žåãååçã«å
åŽã®articleèŠçŽ ãå€åŽã®èšäºã®å
容ã«é¢é£ããèšäºã衚ããããšãã°ããŠãŒã¶ãŒã®æçš¿ã³ã¡ã³ããåãä»ãããµã€ãã®ããã°ãšã³ããªã¯ãããã°ãšã³ããªã®articleèŠçŽ å
ã«ãã¹ããããarticleèŠçŽ ãšããŠã³ã¡ã³ãã衚ãããšãã§ããã
articleèŠçŽ ã«é¢é£ä»ããããŠããèè
ã®æ
å ±ïŒaddressèŠçŽ ãåç
§ã®ããšïŒã¯ããã¹ããããarticleèŠçŽ ã«ã¯é©çšãããªãã
ã·ã³ãžã±ãŒã·ã§ã³ã§åé
åžãããã³ã³ãã³ããšãšãã«æç¢ºã«äœ¿çšãããå ŽåãarticleèŠçŽ ã¯ãAtomã§ã®entryèŠçŽ ã®ç®çãšé¡äŒŒæ§ãããã[ATOM]
ããŒãžã®äž»èŠã³ã³ãã³ãïŒããªãã¡ããã¿ãŒãããããŒãããã²ãŒã·ã§ã³ãããã¯ãããã³ãµã€ãããŒãé€ãïŒãããã¹ãŠåäžã®èªå·±å®çµåã®æ§æç©ã§ããå Žåãã³ã³ãã³ãã¯mainèŠçŽ ã§ããŒã¯ã¢ãããããã¹ãã§ããããã€ã³ã³ãã³ãã¯ãŸãarticleã§ããŒã¯ã¢ãããããŠãããããïŒåäžã®ææžã§ããããã«ãããŒãžãåäžã®æ§æç©ã§ããããšã¯èªæãªã®ã§ïŒãã®å Žåã¯æè¡çã«åé·ã§ããã
ãã®äŸã¯ãschema.org泚éããã€articleèŠçŽ ã䜿çšããããã°èšäºã瀺ãã
<article itemscope itemtype="http://schema.org/BlogPosting"> <header> <h1 itemprop="headline">The Very First Rule of Life</h1> <p><time itemprop="datePublished" datetime="2009-10-09">3 days ago</time></p> <link itemprop="url" href="?comments=0"> </header> <p>If there's a microphone anywhere near you, assume it's hot and sending whatever you're saying to the world. Seriously.</p> <p>...</p> <footer> <a itemprop="discussionUrl" href="?comments=1">Show comments...</a> </footer> </article>
ããã¯åãããã°ã®èšäºã§ããããã³ã¡ã³ãã®äžéšã瀺ãïŒ
<article itemscope itemtype="http://schema.org/BlogPosting">
<header>
<h1 itemprop="headline">The Very First Rule of Life</h1>
<p><time itemprop="datePublished" datetime="2009-10-09">3 days ago</time></p>
<link itemprop="url" href="?comments=0">
</header>
<p>If there's a microphone anywhere near you, assume it's hot and
sending whatever you're saying to the world. Seriously.</p>
<p>...</p>
<section>
<h1>Comments</h1>
<article itemprop="comment" itemscope itemtype="http://schema.org/UserComments" id="c1">
<link itemprop="url" href="#c1">
<footer>
<p>Posted by: <span itemprop="creator" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">George Washington</span>
</span></p>
<p><time itemprop="commentTime" datetime="2009-10-10">15 minutes ago</time></p>
</footer>
<p>Yeah! Especially when talking about your lobbyist friends!</p>
</article>
<article itemprop="comment" itemscope itemtype="http://schema.org/UserComments" id="c2">
<link itemprop="url" href="#c2">
<footer>
<p>Posted by: <span itemprop="creator" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">George Hammond</span>
</span></p>
<p><time itemprop="commentTime" datetime="2009-10-10">5 minutes ago</time></p>
</footer>
<p>Hey, you have the same first name as me.</p>
</article>
</section>
</article>
ïŒããšãã°ã誰ããã€æžããããªã©ïŒåã³ã¡ã³ãã«å¯ŸããŠæ
å ±ãäžããããã®footerã®çšæ³ã«æ³šæããããšãããšãã°ãã®å Žåã®ããã«ãfooterèŠçŽ ã¯ãé©åãªå Žåã«ãã®ã»ã¯ã·ã§ã³ã®å
é ã«è¡šç€ºããããšãã§ãããïŒãã®å Žåãheaderã®äœ¿çšã¯ãã©ã¡ããééã£ãŠããªãã ãããããã¯äž»ã«ãªãŒãµãªã³ã°ã®å¥œã¿ã®åé¡ã§ãããïŒ
sectionèŠçŽ regionããŒã« ïŒããã©ã«ã - èšå®ããªãïŒã alertãalertdialogãapplicationãcontentinfoãdialogãdocumentãlogãmainãmarqueeãpresentationãsearchãŸãã¯statusãaria-*屿§ãHTMLElementã䜿çšãããsectionèŠçŽ ã¯ãææžãŸãã¯ã¢ããªã±ãŒã·ã§ã³ã®äžè¬çã»ã¯ã·ã§ã³ã衚ãããã®æèã«ãããŠã»ã¯ã·ã§ã³ã¯ãäž»é¡ã衚ãã³ã³ãã³ãã®ã°ã«ãŒãã§ãããåsectionã®äž»é¡ã¯ãsectionèŠçŽ ã®åãšããŠèŠåºãïŒh1-h6èŠçŽ ïŒãå«ãããšã«ãã£ãŠäžè¬ã«èå¥ãããã¹ãã§ããã
ã»ã¯ã·ã§ã³ã®äŸã¯ãç« ãã¿ãä»ãã®ãã€ã¢ãã°ããã¯ã¹å ã®ããŸããŸãªã¿ãä»ãããŒãžããŸãã¯è«æã®çªå·ä»ãã»ã¯ã·ã§ã³ã§ãããããŠã§ããµã€ãã®ããŒã ããŒãžã¯ãã¯ãããããã¥ãŒã¹ãããã³é£çµ¡å æ å ±ã®ã»ã¯ã·ã§ã³ã«åããããšãã§ããã ããã
èŠçŽ ã®ã³ã³ãã³ããé
絊ããããšãçã«ããªãå Žåãèè
ã¯sectionèŠçŽ ã®ä»£ããã«articleèŠçŽ ã䜿çšããããæšå¥šãããã
sectionèŠçŽ ã¯å
æ¬çãªã³ã³ããèŠçŽ ã§ã¯ãªããèŠçŽ ãã¹ã¿ã€ã«ä»ãç®çãŸãã¯ã¹ã¯ãªããã£ã³ã°ã®äŸ¿å®ã®ããã«å¿
èŠã«ãªã£ãå Žåã®ã¿ãèè
ã¯ã代ããã«divèŠçŽ ã䜿çšããããæšå¥šããããèŠçŽ ã®å
å®¹ãææžã®ã¢ãŠãã©ã€ã³ã§æç€ºçã«èšèŒãããã ããå Žåã®ã¿ãsectionèŠçŽ ãé©åã§ãããšããã®ãäžè¬çãªã«ãŒã«ã§ããã
次ã®äŸã«ãããŠã2ã€ã®çãã»ã¯ã·ã§ã³ãå«ãããªã³ãŽã«ã€ããŠïŒå€§èŠæš¡ãªãŠã§ãããŒãžã®äžéšïŒã®èšäºãèŠãŠã¿ãã
<article> <header> <h2>Apples</h2> <p>Tasty, delicious fruit!</p> </header> <p>The apple is the pomaceous fruit of the apple tree.</p> <section> <h3>Red Delicious</h3> <p>These bright red apples are the most common found in many supermarkets.</p> </section> <section> <h3>Granny Smith</h3> <p>These juicy, green apples make a great filling for apple pies.</p> </section> </article>
ããã¯ã2ã€ã®ã»ã¯ã·ã§ã³ããã€åæ¥åŒã®ããã°ã©ã ã§ããã1ã€ã¯åæ¥ãã人ã®ãªã¹ãããã1ã€ã¯åŒã®èª¬æã§ãããïŒãã®äŸã«ãããŠããŒã¯ã¢ããã¯ãèŠçŽ éã®ç©ºçœã®éãæå°åããããã«äœ¿çšãããçããã¹ã¿ã€ã«ãç¹åŸŽãšãããïŒ
<!DOCTYPE Html>
<Html
><Head
><Title
>Graduation Ceremony Summer 2022</Title
></Head
><Body
><H1
>Graduation</H1
><Section
><H2
>Ceremony</H2
><P
>Opening Procession</P
><P
>Speech by Validactorian</P
><P
>Speech by Class President</P
><P
>Presentation of Diplomas</P
><P
>Closing Speech by Headmaster</P
></Section
><Section
><H2
>Graduates</H2
><Ul
><Li
>Molly Carpenter</Li
><Li
>Anastasia Luccio</Li
><Li
>Ebenezar McCoy</Li
><Li
>Karrin Murphy</Li
><Li
>Thomas Raith</Li
><Li
>Susan Rodriguez</Li
></Ul
></Section
></Body
></Html>
ãã®äŸã«ãããŠãæ¬ã®èè
ã¯ãç« ãšä»é²ã®ãããªããã€ãã®ã»ã¯ã·ã§ã³ãããŒã¯ã¢ããããç°ãªãã»ã¯ã·ã§ã³ã®2ã€ã®ã¯ã©ã¹ã§ããããŒãã¹ã¿ã€ã«ä»ãããããã«CSSã䜿çšããŠãããå
šäœã®æ¬ã¯ãä»ã®æ¬ãå«ããã倧ããªææžã®äžéšãšããŠarticleèŠçŽ ã«å
ãŸããã
<article class="book">
<style>
section { border: double medium; margin: 2em; }
section.chapter h1 { font: 2em Roboto, Helvetica Neue, sans-serif; }
section.appendix h1 { font: small-caps 2em Roboto, Helvetica Neue, sans-serif; }
</style>
<header>
<h2>My Book</h2>
<p>A sample with not much content</p>
<p><small>Published by Dummy Publicorp Ltd.</small></p>
</header>
<section class="chapter">
<h3>My First Chapter</h3>
<p>This is the first of my chapters. It doesn't say much.</p>
<p>But it has two paragraphs!</p>
</section>
<section class="chapter">
<h3>It Continutes: The Second Chapter</h3>
<p>Bla dee bla, dee bla dee bla. Boom.</p>
</section>
<section class="chapter">
<h3>Chapter Three: A Further Example</h3>
<p>It's not like a battle between brightness and earthtones would go
unnoticed.</p>
<p>But it might ruin my story.</p>
</section>
<section class="appendix">
<h3>Appendix A: Overview of Examples</h3>
<p>These are demonstrations.</p>
</section>
<section class="appendix">
<h3>Appendix B: Some Closing Remarks</h3>
<p>Hopefully this long example shows that you <em>can</em> style
sections, so long as they are used to indicate actual sections.</p>
</section>
</article>
navèŠçŽ mainèŠçŽ ãåå«ã«ãããªããnavigationããŒã«ïŒããã©ã«ã - èšå®ããªãïŒãŸãã¯presentationãaria-*屿§ãHTMLElementã䜿çšãããnavèŠçŽ ã¯ãä»ã®ããŒãžãžãŸãã¯ããŒãžå
ã®äžéšãžãªã³ã¯ããããŒãžã®ã»ã¯ã·ã§ã³ãããªãã¡ããã²ãŒã·ã§ã³ãªã³ã¯ããã€ã»ã¯ã·ã§ã³ã衚ãã
navèŠçŽ ã®ã³ã³ãã³ããé
ç®ã®ãªã¹ãã衚ãå Žåãçè§£ãšããã²ãŒã·ã§ã³ãæ¯æŽããããã«ããªã¹ãã®ããŒã¯ã¢ããã䜿çšããã
ããŒãžäžã®ãªã³ã¯ã®ã°ã«ãŒããnavèŠçŽ ã§ããå¿
èŠã¯ãªãâãã®èŠçŽ ã¯ãäž»èŠãªããã²ãŒã·ã§ã³ãããã¯ããæãã»ã¯ã·ã§ã³ãäž»ã«å¯Ÿè±¡ãšããŠãããç¹ã«ããµãŒãã¹ã®æ¡ä»¶ãããŒã ããŒãžãèäœæš©ããŒãžã®ãããªããµã€ãã®ããŸããŸãªããŒãžãžã®ç°¡æœãªãªã³ã¯ã®ãªã¹ããããã¿ãŒãæã€ããšã¯ãäžè¬çã§ãããfooterèŠçŽ ã¯åç¬ã§ããã®ãããªå Žåã«å¯ŸããŠååã§ãããäžæ¹navèŠçŽ ã¯ããã®ãããªå Žåã«äœ¿çšã§ããããéåžžäžèŠã§ããã
åæã®ã¬ã³ããªã³ã°ã§çç¥ãããŠããããã²ãŒã·ã§ã³æ å ±ããå©çãåŸãããšãã§ããããŸãã¯ããã«å©çšå¯èœã§ããããã²ãŒã·ã§ã³æ å ±ããå©çãåŸãããšãã§ãããŠãŒã¶ãŒã察象ãšããïŒã¹ã¯ãªãŒã³ãªãŒããŒãªã©ã®ïŒãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ãããŒãžäžã®ã©ã®ã³ã³ãã³ãã«æåã«ã¹ããããŸãã¯èŠæ±ïŒãããã¯ãã®äž¡æ¹ïŒã«å¿ããŠæäŸããããæ±ºå®ããæ¹æ³ãšããŠããã®èŠçŽ ã䜿çšã§ããã
次ã®äŸã«ãããŠãããŒãžã¯ãªã³ã¯ãååšããè€æ°ã®å Žæãæã€ãããã®ãã¡ã®1ã€ã®ã¿ãããã²ãŒã·ã§ã³ã»ã¯ã·ã§ã³ãšã¿ãªãããã
<body itemscope itemtype="http://schema.org/Blog">
<header>
<h1>Wake up sheeple!</h1>
<p><a href="news.html">News</a> -
<a href="blog.html">Blog</a> -
<a href="forums.html">Forums</a></p>
<p>Last Modified: <span itemprop="dateModified">2009-04-01</span></p>
<nav>
<h1>Navigation</h1>
<ul>
<li><a href="articles.html">Index of all articles</a></li>
<li><a href="today.html">Things sheeple need to wake up for today</a></li>
<li><a href="successes.html">Sheeple we have managed to wake</a></li>
</ul>
</nav>
</header>
<main>
<article itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<header>
<h1 itemprop="headline">My Day at the Beach</h1>
</header>
<div itemprop="articleBody">
<p>Today I went to the beach and had a lot of fun.</p>
...more content...
</div>
<footer>
<p>Posted <time itemprop="datePublished" datetime="2009-10-10">Thursday</time>.</p>
</footer>
</article>
...more blog posts...
</main>
<footer>
<p>Copyright ©
<span itemprop="copyrightYear">2010</span>
<span itemprop="copyrightHolder">The Example Company</span>
</p>
<p><a href="about.html">About</a> -
<a href="policy.html">Privacy Policy</a> -
<a href="contact.html">Contact Us</a></p>
</footer>
</body>
ããŒãžã®äž»èŠã³ã³ãã³ããå
ãããã«äœ¿çšãããŠããmainèŠçŽ ã«æ³šç®ããããã®å ŽåãããŒãžããããŒãšããã¿ãŒä»¥å€ã®å
šãŠã®ã³ã³ãã³ããšãªãã
ããã°ã®èšäºã«ã€ããŠãå ¬éæ¥ããã³ãã®ä»ã®ã¡ã¿ããŒã¿ãæäŸããããã«schema.orgã®èªåœã䜿çšããäžèšã®äŸã§ããã€ã¯ãããŒã¿ã®æ³šéãèŠãããšãã§ããã
次ã®äŸã«ãããŠã2ã€ã®navèŠçŽ ãããã1ã€ã¯ãµã€ãåšèŸºã®äž»èŠãªããã²ãŒã·ã§ã³ã®ããããã1ã€ã¯ããŒãžèªèº«åšèŸºã®è£å©çãªããã²ãŒã·ã§ã³çšã§ããã
<body>
<h1>The Wiki Center Of Exampland</h1>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/events">Current Events</a></li>
...more...
</ul>
</nav>
<main>
<header>
<h1>Demos in Exampland</h1>
<p>Written by A. N. Other.</p>
</header>
<nav>
<ul>
<li><a href="#public">Public demonstrations</a></li>
<li><a href="#destroy">Demolitions</a></li>
...more...
</ul>
</nav>
<div>
<section id="public">
<h1>Public demonstrations</h1>
<p>...more...</p>
</section>
<section id="destroy">
<h1>Demolitions</h1>
<p>...more...</p>
</section>
...more...
</div>
<footer>
<p><a href="?edit">Edit</a> | <a href="?delete">Delete</a> | <a href="?Rename">Rename</a></p>
</footer>
</main>
<footer>
<p><small>© copyright 1998 Exampland Emperor</small></p>
</footer>
</body>
navèŠçŽ ã¯ãªã¹ããå«ããå¿
èŠã¯ãªããåæ§ã«ä»ã®çš®é¡ã®ã³ã³ãã³ããå«ãããšãã§ããããã®ããã²ãŒã·ã§ã³ãããã¯ã«ãããŠããªã³ã¯ã¯æã§æäŸãããŠããïŒ
<nav> <h1>Navigation</h1> <p>You are on my home page. To the north lies <a href="/blog">my blog</a>, from whence the sounds of battle can be heard. To the east you can see a large mountain, upon which many <a href="/school">school papers</a> are littered. Far up thus mountain you can spy a little figure who appears to be me, desperately scribbling a <a href="/school/thesis">thesis</a>.</p> <p>To the west are several exits. One fun-looking exit is labeled <a href="http://games.example.com/">"games"</a>. Another more boring-looking exit is labeled <a href="http://isp.example.net/">ISPâ¢</a>.</p> <p>To the south lies a dark and dank <a href="/about">contacts page</a>. Cobwebs cover its disused entrance, and at one point you see a rat run quickly out of the page.</p> </nav>
asideèŠçŽ mainèŠçŽ ãåå«ã«ãããªããcomplementaryããŒã«ïŒããã©ã«ã - èšå®ããªãïŒãnoteãsearchãŸãã¯presentationãaria-*屿§ãHTMLElementã䜿çšãããasideèŠçŽ ã¯ãasideèŠçŽ ã®åšãã«ã³ã³ãã³ããšãããã«é¢é£ãããã€ãã®ã³ã³ãã³ãããåé¢ãããšèŠãªãããšãã§ããã³ã³ãã³ãã§æ§æãããããŒãžã®ã»ã¯ã·ã§ã³ã衚ãããã®ãããªã»ã¯ã·ã§ã³ã¯ããã°ãã°æŽ»çå°å·ã§ãµã€ãããŒãšããŠè¡šç€ºãããã
ãã®èŠçŽ ã¯ãªãŒãæãŸãã¯ãµã€ãããŒã®ãããªå°å·äžã®å¹æã«å¯ŸããŠãnavã®èŠçŽ ã®ã°ã«ãŒãã«å¯ŸããŠãåºåã«å¯ŸããŠãããã³ãã®ããŒãžã®ã¡ã€ã³ã³ã³ãã³ããšã¯å¥ã«èããããä»ã®ã³ã³ãã³ãã«å¯ŸããŠäœ¿çšã§ããã
ãããã®ææžã¯ã¡ã€ã³ãããŒã®äžéšã§ããã®ã§ãåã«æ¿å
¥å¥ã«asideèŠçŽ ã䜿çšããããšã¯é©åã§ãªãã
次ã®äŸã¯ãasideããšãŒãããã®ããªãé·ããã¥ãŒã¹èšäºã§ã¹ã€ã¹ã®èæ¯çŽ æãããŒã¯ã¢ããã«å¯ŸããŠäœ¿çšãããæ§åã瀺ãã
<aside> <h1>Switzerland</h1> <p>Switzerland, a land-locked country in the middle of geographic Europe, has not joined the geopolitical European Union, though it is a signatory to a number of European treaties.</p> </aside>
次ã®äŸã¯ãasideãé·ãèšäºã§ãªãŒãæã®ããŒã¯ã¢ããã«å¯ŸããŠäœ¿çšãããæ§åã瀺ãã
... <p>He later joined a large company, continuing on the same work. <q>I love my job. People ask me what I do for fun when I'm not at work. But I'm paid to do my hobby, so I never know what to answer. Some people wonder what they would do if they didn't have to work... but I know what I would do, because I was unemployed for a year, and I filled that time doing exactly what I do now.</q></p> <aside> <q> People ask me what I do for fun when I'm not at work. But I'm paid to do my hobby, so I never know what to answer. </q> </aside> <p>Of course his work â or should that be hobby? â isn't his only passion. He also enjoys other pleasures.</p> ...
以äžã¯ãããã°ããŒã«ïŒä»ã®ããã°ãžã®ãªã³ã¯ïŒãšããã°ã®å察åŽã®ã³ã³ãã³ãã«asideã䜿çšãããæ§åã瀺ãã
<body>
<header>
<h1>My wonderful blog</h1>
<p>My tagline</p>
</header>
<aside>
<!-- this aside contains two sections that are tangentially related
to the page, namely, links to other blogs, and links to blog posts
from this blog -->
<nav>
<h1>My blogroll</h1>
<ul>
<li><a href="http://blog.example.com/">Example Blog</a>
</ul>
</nav>
<nav>
<h1>Archives</h1>
<ol reversed>
<li><a href="/last-post">My last post</a>
<li><a href="/first-post">My first post</a>
</ol>
</nav>
</aside>
<aside>
<!-- this aside is tangentially related to the page also, it
contains twitter messages from the blog author -->
<h1>Twitter Feed</h1>
<blockquote cite="http://twitter.example.net/t31351234">
I'm on vacation, writing my blog.
</blockquote>
<blockquote cite="http://twitter.example.net/t31219752">
I'm going to go on vacation soon.
</blockquote>
</aside>
<article>
<!-- this is a blog post -->
<h1>My last post</h1>
<p>This is my last post.</p>
<footer>
<p><a href="/last-post" rel=bookmark>Permalink</a>
</footer>
</article>
<article>
<!-- this is also a blog post -->
<h1>My first post</h1>
<p>This is my first post.</p>
<aside>
<!-- this aside is about the blog post, since it's inside the
<article> element; it would be wrong, for instance, to put the
blogroll here, since the blogroll isn't really related to this post
specifically, only to the page as a whole -->
<h1>Posting</h1>
<p>While I'm thinking about it, I wanted to say something about
posting. Posting is fun!</p>
</aside>
<footer>
<p><a href="/first-post" rel=bookmark>Permalink</a>
</footer>
</article>
<footer>
<nav>
<a href="/archives">Archives</a> â
<a href="/about">About me</a> â
<a href="/copyright">Copyright</a>
</nav>
</footer>
</body>
h1ãh2ãh3ãh4ãh5ãh6èŠçŽ headingããŒã«ïŒããã©ã«ã - èšå®ããªãïŒãtabãŸãã¯presentationãaria-*屿§ãinterface HTMLHeadingElement : HTMLElement {};
ãããã®èŠçŽ ã¯ããã®ã»ã¯ã·ã§ã³ã®èŠåºãã衚ãã
ã»ãã³ãã£ãã¯ãšãããã®èŠçŽ ã®æå³ã¯èŠåºããšã»ã¯ã·ã§ã³ã®ç¯ã§å®çŸ©ãããã
ãããã®èŠçŽ ã¯ãèŠçŽ åã®æ°åã§äžããããã©ã³ã¯ãæã€ãh1èŠçŽ ãæãé«ãã©ã³ã¯ãæã€ãšèšãããh6èŠçŽ ãæãäœãã©ã³ã¯ãæã¡ãåãååããã€2ã€ã®èŠçŽ ã¯çããã©ã³ã¯ãæã€ã
æ°ããã»ã¯ã·ã§ã³ãŸãã¯ãµãã»ã¯ã·ã§ã³ã®èŠåºãã§ããããšãæå³ããå Žåãé€ããå°èŠåºããåå¹ã代æ¿ã¿ã€ãã«ããã£ãããã¬ãŒãºãããŒã¯ã¢ããããããã«h1âh6èŠçŽ ã䜿çšããŠã¯ãªããªãã代ããã«ã仿§ã®å°çšèŠçŽ ãªãã§å
±éã€ãã£ãªã ã®ç¯ã«ãããããŒã¯ã¢ãããã¿ãŒã³ã䜿çšããã
ããããã®ææžã®ã¢ãŠãã©ã€ã³ïŒãã®èŠåºããšã»ã¯ã·ã§ã³ã®æ§é ïŒãé¢ä¿ããéãã«ãããŠã次ã®2ã€ã®æçã¯ãã»ãã³ãã£ãã¯ã«ç䟡ã§ããïŒ
<body> <h1>Let's call it a draw(ing surface)</h1> <h2>Diving in</h2> <h2>Simple shapes</h2> <h2>Canvas coordinates</h2> <h3>Canvas coordinates diagram</h3> <h2>Paths</h2> </body>
<body> <h1>Let's call it a draw(ing surface)</h1> <section> <h1>Diving in</h1> </section> <section> <h1>Simple shapes</h1> </section> <section> <h1>Canvas coordinates</h1> <section> <h1>Canvas coordinates diagram</h1> </section> </section> <section> <h1>Paths</h1> </section> </body>
èè ã¯ããã®ç°¡æœãã®ããã«åè ã®ã¹ã¿ã€ã«ã奜ããããããªããã倧éã®ç·šéãç®ã®åã«ããŠå©äŸ¿æ§ã®ããã«åŸè ã®ã¹ã¿ã€ã«ã奜ããããããªããã©ã¡ããçŽç²ã«æè¯ãªã®ãã¯ããªãŒãµãªã³ã°ã¹ã¿ã€ã«ã®å¥œã¿ã®åé¡ã§ããã
headerèŠçŽ headerãfooterããŸãã¯mainèŠçŽ ã®åå«ãé€ããbannerããŒã«ïŒããã©ã«ã - èšå®ããªãïŒãŸãã¯presentationãaria-*屿§ãHTMLElementã䜿çšãããheaderèŠçŽ ã¯ããã®çŽè¿ã®ç¥å
ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ããŸãã¯ã»ã¯ã·ã§ãã³ã°ã«ãŒãèŠçŽ ã«å¯ŸããããããŒã衚ããheaderã¯èŠçŽ ã¯å
žåçã«ãå眮ããŸãã¯ããã²ãŒã·ã§ã³è£å©ã®ã°ã«ãŒããå«ãã
æãè¿ãç¥å ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ããŸãã¯ã»ã¯ã·ã§ãã³ã°ã«ãŒãèŠçŽ ãbodyèŠçŽ ã§ããå Žåãããã¯ããŒãžå šäœã«é©çšãããã
headerèŠçŽ ã¯ãéåžžãã»ã¯ã·ã§ã³ã®èŠåºãïŒh1âh6èŠçŽ ïŒãå«ãããã«æå³ãããããããã¯å¿
é ã§ã¯ãªããheaderèŠçŽ ã¯ãŸããã»ã¯ã·ã§ã³ã®ã³ã³ãã³ãã®ç®é²ãæ€çŽ¢ãã©ãŒã ããŸãã¯é¢é£ããããŽãå
ãããã«äœ¿çšã§ããã
ãµã³ãã«headerã¯ä»¥äžã®ãšããããã®æåã®ãã®ã¯ãã²ãŒã ã®ããã«ååšããïŒ
<header> <p>Welcome to...</p> <h1>Voidwars!</h1> </header>
æ¬¡ã®æçã¯ãèŠçŽ ã仿§ã®ããããŒãããŒã¯ã¢ããã«å¯ŸããŠäœ¿çšã§ããæ§åã瀺ãã
<header> <h1>Scalable Vector Graphics (SVG) 1.2</h1> <p>W3C Working Draft 27 October 2004</p> <dl> <dt>This version:</dt> <dd><a href="http://www.w3.org/TR/2004/WD-SVG12-20041027/">http://www.w3.org/TR/2004/WD-SVG12-20041027/</a></dd> <dt>Previous version:</dt> <dd><a href="http://www.w3.org/TR/2004/WD-SVG12-20040510/">http://www.w3.org/TR/2004/WD-SVG12-20040510/</a></dd> <dt>Latest version of SVG 1.2:</dt> <dd><a href="http://www.w3.org/TR/SVG12/">http://www.w3.org/TR/SVG12/</a></dd> <dt>Latest SVG Recommendation:</dt> <dd><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></dd> <dt>Editor:</dt> <dd>Dean Jackson, W3C, <a href="mailto:dean@w3.org">dean@w3.org</a></dd> <dt>Authors:</dt> <dd>See <a href="#authors">Author List</a></dd> </dl> <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notic ... </header>
headerèŠçŽ ã¯ãã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãã§ã¯ãªããæ°ããã»ã¯ã·ã§ã³ãå°å
¥ããªãã
ãã®äŸã¯ãããŒãžãh1èŠçŽ ã§äžããããããŒãžèŠåºããšãh2èŠçŽ ã«ãã£ãŠäžãããã2ã€ã®ãµãã»ã¯ã·ã§ã³ãæã€ãheaderèŠçŽ ã¯ã¢ãŠãã©ã€ã³ã¢ã«ãŽãªãºã ã«åå ããªããããheaderèŠçŽ ã®åŸã®ã³ã³ãã³ãã¯ãäŸç¶ãšããŠheaderèŠçŽ ã§æåŸã«éå§ãããµãã»ã¯ã·ã§ã³ã®äžéšã§ããã
<body>
<header>
<h1>Little Green Guys With Guns</h1>
<nav>
<ul>
<li><a href="/games">Games</a>
<li><a href="/forum">Forum</a>
<li><a href="/download">Download</a>
</ul>
</nav>
<h2>Important News</h2> <!-- this starts a second subsection -->
<!-- this is part of the subsection entitled "Important News" -->
<p>To play today's games you will need to update your client.</p>
<h2>Games</h2> <!-- this starts a third subsection -->
</header>
<p>You have three active games:</p>
<!-- this is still part of the subsection entitled "Games" -->
...
footerèŠçŽ headerãfooterããŸãã¯mainèŠçŽ ã®åå«ãé€ããcontentinfoããŒã«ïŒããã©ã«ã - èšå®ããªãïŒãŸãã¯presentationãaria-*屿§ãHTMLElementã䜿çšãããfooterèŠçŽ ã¯ããã®çŽè¿ã®ç¥å
ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ããŸãã¯ã»ã¯ã·ã§ãã³ã°ã«ãŒãèŠçŽ ã«å¯Ÿããããã¿ãŒã衚ããããã¿ãŒã¯ãããšãã°èª°ãæžããããé¢é£ææžãžã®ãªã³ã¯ãèäœæš©ããŒã¿ãªã©ããã®ã»ã¯ã·ã§ã³é¢ããæ
å ±ãäžè¬ã«å«ãã
footerèŠçŽ ãã»ã¯ã·ã§ã³å
šäœãå«ãå Žåãä»é²ã玢åŒãé·ã奥ä»ãåé·ãªã©ã€ã»ã³ã¹å¥çŽãªã©ã®ã³ã³ãã³ãã衚ãã
ã»ã¯ã·ã§ã³ã®èè
ãç·šéè
ã«å¯Ÿããé£çµ¡å
æ
å ±ã¯ãããããfooterå
åŽã«ããèªèº«ãaddressèŠçŽ ã«å±ãããheaderãfooterã®äž¡æ¹ã«é©ããã ããçœ²åæ¬ããã³ãã®ä»ã®æ
å ±ã¯ãããããïŒãŸãã¯ã©ã¡ãã§ããªãïŒã«é
眮ã§ããããããã®èŠçŽ ã®äž»ãªç®çã¯ãèè
ãç¶æããã¹ã¿ã€ã«ã容æã§ããèªæã®ããŒã¯ã¢ãããæžãããã ãã§ããããããèŠçŽ ã¯èè
ã«ç¹å®ã®æ§é ã課ãããšãæå³ãããã®ã§ã¯ãªãã
ããã¿ãŒã¯å¿ ããããã»ã¯ã·ã§ã³ã®æåŸã«åºçŸããå¿ èŠã¯ãªãïŒéåžžã¯æåŸã ãïŒã
æãè¿ãç¥å ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ããŸãã¯ã»ã¯ã·ã§ãã³ã°ã«ãŒãèŠçŽ ãbodyèŠçŽ ã§ããå Žåãããã¯ããŒãžå šäœã«é©çšãããã
footerèŠçŽ ã¯ãã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãã§ã¯ãªããæ°ããã»ã¯ã·ã§ã³ãå°å
¥ããªãã
ããã¯ãäžçªäžãšäžçªäžã«2ã€ã®ããã¿ãŒãæã€ãåãã³ã³ãã³ãã®ããŒãžã§ããïŒ
<body> <footer><a href="../">Back to index...</a></footer> <div> <h1>Lorem ipsum</h1> <p>The ipsum of all lorems</p> </div> <p>A dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <footer><a href="../">Back to index...</a></footer> </body>
ããã¯ããµã€ãå
šäœã®ããã¿ãŒãšã»ã¯ã·ã§ã³ããã¿ãŒã®äž¡æ¹ã«äœ¿çšãããŠããfooterèŠçŽ ã瀺ãäŸã§ããã
<!DOCTYPE HTML>
<HTML><HEAD>
<TITLE>The Ramblings of a Scientist</TITLE>
<BODY>
<H1>The Ramblings of a Scientist</H1>
<MAIN>
<ARTICLE>
<H1>Episode 15</H1>
<VIDEO SRC="/fm/015.ogv" CONTROLS PRELOAD>
<P><A HREF="/fm/015.ogv">Download video</A>.</P>
</VIDEO>
<FOOTER> <!-- footer for article -->
<P>Published <TIME DATETIME="2009-10-21T18:26-07:00">on 2009/10/21 at 6:26pm</TIME></P>
</FOOTER>
</ARTICLE>
<ARTICLE>
<H1>My Favorite Trains</H1>
<P>I love my trains. My favorite train of all time is a Köf.</P>
<P>It is fun to see them pull some coal cars because they look so
dwarfed in comparison.</P>
<FOOTER> <!-- footer for article -->
<P>Published <TIME DATETIME="2009-09-15T14:54-07:00">on 2009/09/15 at 2:54pm</TIME></P>
</FOOTER>
</ARTICLE>
</MAIN>
<FOOTER> <!-- site wide footer -->
<NAV>
<P><A HREF="/credits.html">Credits</A> â
<A HREF="/tos.html">Terms of Service</A> â
<A HREF="/index.html">Blog Index</A></P>
</NAV>
<P>Copyright © 2009 Gordon Freeman</P>
</FOOTER>
</BODY>
</HTML>
äžéšã®ãµã€ãã®ãã¶ã€ã³ã¯ãæã "ååãããã¿ãŒ"ãšåŒã°ãããã®ãæã€âããã¿ãŒã¯ãç»åãä»ã®èšäºãžã®ãªã³ã¯ããã£ãŒãããã¯éä¿¡çšããŒãžãžã®ãªã³ã¯ãç¹å¥ãªãã¡ãŒãªã©ãããã€ãã®ç¹ã§ãããã¿ãŒã§å šäœã®"ããã³ãããŒãž"ãšãããã倧éã®çŽ æãå«ãã
ãã®æçã¯ã"ååãããã¿ãŒ"ããã€ãµã€ãäžã§ããŒãžã®æäžéšã瀺ãïŒ
...
<footer>
<nav>
<section>
<h1>Articles</h1>
<p><img src="images/somersaults.jpeg" alt=""> Go to the gym with
our somersaults class! Our teacher Jim takes you through the paces
in this two-part article. <a href="articles/somersaults/1">Part
1</a> · <a href="articles/somersaults/2">Part 2</a></p>
<p><img src="images/kindplus.jpeg"> Tired of walking on the edge of
a clif<!-- sic -->? Our guest writer Lara shows you how to bumble
your way through the bars. <a href="articles/kindplus/1">Read
more...</a></p>
<p><img src="images/crisps.jpeg"> The chips are down, now all
that's left is a potato. What can you do with it? <a
href="articles/crisps/1">Read more...</a></p>
</section>
<ul>
<li> <a href="/about">About us...</a>
<li> <a href="/feedback">Send feedback!</a>
<li> <a href="/sitemap">Sitemap</a>
</ul>
</nav>
<p><small>Copyright © 2015 The Snacker â
<a href="/tos">Terms of Service</a></small></p>
</footer>
</body>
addressèŠçŽ headerãfooterãaddressèŠçŽ ã®åå«ãé€ããcontentinfoããŒã«ãaria-*屿§ãHTMLElementã䜿çšãããaddressèŠçŽ ã¯ãæãè¿ãarticleãŸãã¯bodyèŠçŽ ã®ç¥å
ã®é£çµ¡å
æ
å ±ã衚ããç¥å
ãbodyèŠçŽ ã§ããå Žåãé£çµ¡å
æ
å ±ã¯ãææžå
šäœã«é©çšãããã
ããšãã°ãHTMLã«é¢é£ããW3Cã®ãŠã§ããµã€ãã«ããããŒãžã¯ã以äžã®é£çµ¡å æ å ±ãå«ããããããªãïŒ
<ADDRESS> <A href="../People/Raggett/">Dave Raggett</A>, <A href="../People/Arnaud/">Arnaud Le Hors</A>, contact persons for the <A href="Activity">W3C HTML Activity</A> </ADDRESS>
ã¢ãã¬ã¹ãå®éã«é¢é£ããé£çµ¡å
æ
å ±ã§ãªãå ŽåãaddressèŠçŽ ã¯ãä»»æã®ã¢ãã¬ã¹ïŒããšãã°éµäŸ¿ã®å®å
ïŒã衚ãããã«äœ¿çšããŠã¯ãªããªããïŒpèŠçŽ ã¯ãäžè¬ã«äœæãããŒã¯ã¢ããããããã®é©åãªèŠçŽ ã§ãããïŒ
addressèŠçŽ ã¯é£çµ¡å
æ
å ±ä»¥å€ã®æ
å ±ãå«ãã§ã¯ãªããªãã
ããšãã°ã次ã®äŸã¯addressèŠçŽ ã®äžé©åãªçšæ³ã§ããïŒ
<ADDRESS>Last Modified: 1999/12/24 23:37:50</ADDRESS>
äžè¬ã«ãaddressèŠçŽ ã¯ãfooterèŠçŽ ã§ä»ã®æ
å ±ãšäžç·ã«å«ãŸããã ããã
The contact information for a node node is a
collection of address elements defined by the first
applicable entry from the following list:
article elementbody elementThe contact information consists of all the
address elements that have node
as an ancestor and do not have another body or
article element ancestor that is a descendant of node.
article elementbody elementThe contact information of node is the same
as the contact information of the nearest article or
body element ancestor, whichever is nearest.
Document has a body elementThe contact information of node is the same
as the contact information of the body element of the
Document.
There is no contact information for node.
User agents may expose the contact information of a node to the user, or use it for other purposes, such as indexing sections based on the sections' contact information.
ãã®äŸã«ãããŠãããã¿ãŒã¯ãé£çµ¡å æ å ±ããã³èäœæš©æ å ±ãå«ãã
<footer> <address> For more details, contact <a href="mailto:js@example.com">John Smith</a>. </address> <p><small>© copyright 2038 Example Corp.</small></p> </footer>
h1âh6èŠçŽ ã¯èŠåºãã§ããã
ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãã®èŠçŽ ã«ãããŠããã£ã³ã°ã³ã³ãã³ãã®æåã®èŠçŽ ã¯ããã®ã»ã¯ã·ã§ã³ã®èŠåºãã衚ããåç以äžã®ã©ã³ã¯ã«å±ããåŸç¶ã®èŠåºãã¯ãæ°ããïŒæé»ã®ïŒã»ã¯ã·ã§ã³ãéå§ããäœãã©ã³ã¯ã®èŠåºãã¯ãåã®ã»ã¯ã·ã§ã³ã®äžéšã§ããæé»ã®ãµãã»ã¯ã·ã§ã³ãéå§ãããã©ã¡ãã®å ŽåããèŠçŽ ã¯æé»ã®ã»ã¯ã·ã§ã³ã®èŠåºãã衚ãã
æ°ããã»ã¯ã·ã§ã³ãŸãã¯ãµãã»ã¯ã·ã§ã³ã®èŠåºãã§ããããšãæå³ããå Žåãé€ããå°èŠåºããåå¹ã代æ¿ã¿ã€ãã«ããã£ãããã¬ãŒãºãããŒã¯ã¢ããããããã«h1âh6èŠçŽ ã䜿çšããŠã¯ãªããªãã代ããã«ã仿§ã®å°çšèŠçŽ ãªãã§å
±éã€ãã£ãªã ã®ç¯ã«ãããããŒã¯ã¢ãããã¿ãŒã³ã䜿çšããã
blockquoteèŠçŽ ãštdèŠçŽ ãå«ãç¹å®ã®èŠçŽ ã¯ãã»ã¯ã·ã§ãã³ã°ã«ãŒãã§ãããšèšãããŠããããããã®èŠçŽ ã¯ãèªåã®ã¢ãŠãã©ã€ã³ãæã€ããšãã§ããããèŠçŽ ã®å
åŽã®ã»ã¯ã·ã§ã³ãšèŠåºãã¯ç¥å
ã®ã¢ãŠãã©ã€ã³ã«å¯äžããªãã
ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãèŠçŽ ã¯ãä»ã®èŠåºããäœæããæé»ã®ã»ã¯ã·ã§ã³ã§ãããã«é¢ããããæãè¿ãç¥å ã»ã¯ã·ã§ãã³ã°ã«ãŒããŸãã¯æãè¿ãã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãã®ç¥å èŠçŽ ã®ãæãè¿ãæ¹ã®ãµãã»ã¯ã·ã§ã³ãšåžžã«ã¿ãªãããã
æ¬¡ã®æçã®å ŽåïŒ
<body> <h1>Foo</h1> <h2>Bar</h2> <blockquote> <h3>Bla</h3> </blockquote> <p>Baz</p> <h2>Quux</h2> <section> <h3>Thud</h3> </section> <p>Grunt</p> </body>
æ§é ã¯æ¬¡ã®ããã«ãªãïŒ
bodyã»ã¯ã·ã§ã³ã®èŠåºãïŒ
sectionã»ã¯ã·ã§ã³ã®èŠåºãïŒ
åŸã®æ®µèœïŒ"Grunt"ïŒããããã¬ãã«ã«æ»ãããã«ãsectionããã以åã®æé»ã®ã»ã¯ã·ã§ã³ãçµäºããæ§åã«æ³šç®ããã
ã»ã¯ã·ã§ã³ã¯ãä»»æã®ã©ã³ã¯ã®èŠåºããå«ãã§ãããããã€èè ã¯ã»ã¯ã·ã§ã³ã®ãã¹ãã¬ãã«ã«é©åãªã©ã³ã¯ã®èŠåºãã䜿çšããããåŒ·ãæšå¥šãããã
èè ã¯ãŸããã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãã®1ã€ã®èŠçŽ ã«è€æ°ã®èŠåºããæã€ããšã«ãã£ãŠçæãããæé»ã®ã»ã¯ã·ã§ã³ã«é Œã代ããã«ãã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãã®èŠçŽ å ã®ã»ã¯ã·ã§ã³ãæç€ºçã«å ãããšãæšå¥šãããã
ããšãã°ã以äžã¯æ£ããïŒ
<body> <h4>Apples</h4> <p>Apples are fruit.</p> <section> <h2>Taste</h2> <p>They taste lovely.</p> <h6>Sweet</h6> <p>Red apples are sweeter than green ones.</p> <h1>Color</h1> <p>Apples come in various colors.</p> </section> </body>
ãã ããåãææžãããæç¢ºã«è¡šçŸã§ããã ããã
<body> <h1>Apples</h1> <p>Apples are fruit.</p> <section> <h2>Taste</h2> <p>They taste lovely.</p> <section> <h3>Sweet</h3> <p>Red apples are sweeter than green ones.</p> </section> </section> <section> <h2>Color</h2> <p>Apples come in various colors.</p> </section> </body>
äžèšã®ææžã®äž¡æ¹ã¯ãã»ãã³ãã£ãã¯ã«åãã§ãããé©åãŠãŒã¶ãŒãšãŒãžã§ã³ãã§åãã¢ãŠãã©ã€ã³ãçæããã
ãã®3çªç®ã®äŸã¯ãŸããã»ãã³ãã£ãã¯ã«åãã§ãããïŒããšãã°ãã»ã¯ã·ã§ã³ãç·šéã§ç§»åãããå ŽåïŒããç°¡åã«ã¡ã³ããã³ã¹ã§ãããããããªãïŒ
<body> <h1>Apples</h1> <p>Apples are fruit.</p> <section> <h1>Taste</h1> <p>They taste lovely.</p> <section> <h1>Sweet</h1> <p>Red apples are sweeter than green ones.</p> </section> </section> <section> <h1>Color</h1> <p>Apples come in various colors.</p> </section> </body>
ãã®æåŸã®äŸã¯ãã¬ã¬ã·ãŒãã©ãŠã¶ã§ã¬ã³ããªã³ã°ãããããã«æç€ºçãªã¹ã¿ã€ã«èŠåãå¿ èŠã«ãªãã ãããCSSã®ãµããŒããªãã§ã¬ã¬ã·ãŒãã©ãŠã¶ã¯ããããã¬ãã«ã®èŠåºããšããŠããã¹ãŠã®èŠåºããã¬ã³ããªã³ã°ããã ããã
ã¢ã«ãŽãªãºã ãé©åæ§ãã§ãã«ãŒã®ãããªä»ã®ãœãããŠã§ã¢ã«å®è£
ãããããã°ã©ãã£ã«ã«ãã©ãŠã¶ãæ¯æŽæè¡ã®ãŠãŒã¶ãšãŒãžã§ã³ãã«ãããã¢ãŠãã©ã€ã³ã¢ã«ãŽãªãºã ã®æ¢ç¥ã®å®è£
ã¯ãçŸåšååšããªãããããã£ãŠã¢ãŠãã©ã€ã³ã¢ã«ãŽãªãºã ã¯ããŠãŒã¶ãŒã«ææžã®æ§é ãäŒããããã«äŸåããããšãã§ããªããèè
ã¯ãææžæ§é ãäŒããããã«èŠåºãã®ã©ã³ã¯ïŒh1-h6ïŒã䜿çšããããå§ããã
This section defines an algorithm for creating an outline for a sectioning content element or a sectioning root element. It is defined in terms of a walk over the nodes of a DOM tree, in tree order, with each node being visited when it is entered and when it is exited during the walk.
ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãèŠçŽ ãŸãã¯ã»ã¯ã·ã§ãã³ã°ã«ãŒãèŠçŽ ã«å¯Ÿããã¢ãŠãã©ã€ã³ã¯ã1ã€ä»¥äžã®æœåšçã«ãã¹ããããã»ã¯ã·ã§ã³ã®ãªã¹ãã§æ§æããããã»ã¯ã·ã§ã³ã¯ãå
ã®DOMããªãŒã§äžéšã®ããŒãã«å¯Ÿå¿ããã³ã³ããã§ãããåã»ã¯ã·ã§ã³ã¯ãã»ã¯ã·ã§ã³ã«é¢é£ä»ãããã1ã€ã®èŠåºããæã€ããšãã§ããããã«ãã¹ããããä»»æã®æ°ã®ã»ã¯ã·ã§ã³ãå«ãããšãã§ãããThe algorithm for the outline also associates each node in the DOM tree with a particular section and potentially a heading. (The sections in the outline aren't section elements, though some may correspond to such elements â they are merely conceptual sections.)
次ã®ããŒã¯ã¢ããæçã§ïŒ
<body> <h1>A</h1> <p>B</p> <h2>C</h2> <p>D</p> <h2>E</h2> <p>F</p> </body>
ããã¯bodyããŒãïŒãããŠãå
šäœã®ææžïŒã«å¯ŸããŠäœæãããŠãã以äžã®ã¢ãŠãã©ã€ã³ãããããïŒ
ã»ã¯ã·ã§ã³ã¯ãbodyããŒãã«å¯ŸããŠäœæãããã
èŠåºã"A"ãé¢é£ä»ããããŠããã
ãŸããæ®µèœ"B"ãé¢é£ä»ããããŠããã
ãã¹ããããã»ã¯ã·ã§ã³ïŒ
ã»ã¯ã·ã§ã³ã¯1çªç®ã®h2èŠçŽ ã瀺åããã
èŠåºã"C"ãé¢é£ä»ããããŠããã
ãŸããæ®µèœ"D"ãé¢é£ä»ããããŠããã
ãã¹ããããã»ã¯ã·ã§ã³ã¯ãªãã
ã»ã¯ã·ã§ã³ã¯2çªç®ã®h2èŠçŽ ã瀺åããã
èŠåºã"E"ãé¢é£ä»ããããŠããã
ãŸããæ®µèœ"F"ãé¢é£ä»ããããŠããã
ãã¹ããããã»ã¯ã·ã§ã³ã¯ãªãã
The algorithm that must be followed during a walk of a DOM subtree rooted at a sectioning content element or a sectioning root element to determine that element's outline is as follows:
Let current outline target be null. (It holds the element whose outline is being created.)
Let current section be null. (It holds a pointer to a section, so that elements in the DOM can all be associated with a section.)
Create a stack to hold elements, which is used to handle nesting. Initialize this stack to empty.
Walk over the DOM in tree order, starting with the sectioning content element or sectioning root element at the root of the subtree for which an outline is to be created, and trigger the first relevant step below for each element as the walk enters and exits it.
The element being exited is a heading content element or an
element with a hidden attribute.
Pop that element from the stack.
hidden attributeäœãããªãã
hidden attributePush the element being entered onto the stack. (This causes the algorithm to skip that element and any descendants of the element.)
Run these steps:
If current outline target is not null, run these substeps:
If the current section has no heading, create an implied heading and let that be the heading for the current section.
Push current outline target onto the stack.
Let current outline target be the element that is being entered.
Let current section be a newly created section for the current outline target element.
Associate current outline target with current section.
Let there be a new outline for the new current outline target, initialized with just the new current section as the only section in the outline.
Run these steps:
If the current section has no heading, create an implied heading and let that be the heading for the current section.
Pop the top element from the stack, and let the current outline target be that element.
Let current section be the last section in the outline of the current outline target element.
Append the outline of the sectioning content element being exited to the current section. (This does not change which section is the last section in the outline.)
Run these steps:
If current outline target is not null, push current outline target onto the stack.
Let current outline target be the element that is being entered.
Let current outline target's parent section be current section.
Let current section be a newly created section for the current outline target element.
Let there be a new outline for the new current outline target, initialized with just the new current section as the only section in the outline.
Run these steps:
If the current section has no heading, create an implied heading and let that be the heading for the current section.
Let current section be current outline target's parent section.
Pop the top element from the stack, and let the current outline target be that element.
The current outline target is the element being exited, and it is the sectioning content element or a sectioning root element at the root of the subtree for which an outline is being generated.
If the current section has no heading, create an implied heading and let that be the heading for the current section.
Skip to the next step in the overall set of steps. (The walk is over.)
If the current section has no heading, let the element being entered be the heading for the current section.
Otherwise, if the element being entered has a rank equal to or higher than the heading of the last section of the outline of the current outline target, or if the heading of the last section of the outline of the current outline target is an implied heading, then create a new section and append it to the outline of the current outline target element, so that this new section is the new last section of that outline. Let current section be that new section. Let the element being entered be the new heading for the current section.
Otherwise, run these substeps:
Let candidate section be current section.
Heading loop: If the element being entered has a rank lower than the rank of the heading of the candidate section, then create a new section, and append it to candidate section. (This does not change which section is the last section in the outline.) Let current section be this new section. Let the element being entered be the new heading for the current section. Abort these substeps.
Let new candidate section be the section that contains candidate section in the outline of current outline target.
Let candidate section be new candidate section.
Return to the step labeled heading loop.
Push the element being entered onto the stack. (This causes the algorithm to skip any descendants of the element.)
Recall that h1 has the highest rank, and h6
has the lowest rank.
äœãããªãã
In addition, whenever the walk exits a node, after doing the steps above, if the node is not associated with a section yet, associate the node with the section current section.
Associate all nodes with the heading of the section with which they are associated, if any.
The tree of sections created by the algorithm above, or a proper subset thereof, must be used when generating document outlines, for example when generating tables of contents.
The outline created for the body element of a Document is the
outline of the entire document.
When creating an interactive table of contents, entries should jump the user to the relevant sectioning content element, if the section was created for a real element in the original document, or to the relevant heading content element, if the section in the tree was generated for a heading in the above process.
Selecting the first section of the document
therefore always takes the user to the top of the document, regardless of where the first heading
in the body is to be found.
The outline depth of a heading content element associated with a section section is the number of sections that are ancestors of section in the
outermost outline that section finds itself in when the outlines of its Document's elements are created, plus 1. The
outline depth of a heading content element not associated with a section is 1.
User agents should provide default headings for sections that do not have explicit section headings.
Consider the following snippet:
<body> <nav> <p><a href="/">Home</a></p> </nav> <p>Hello world.</p> <aside> <p>My cat is cute.</p> </aside> </body>
Although it contains no headings, this snippet has three sections: a document (the
body) with two subsections (a nav and an aside). A user
agent could present the outline as follows:
These default headings ("Untitled document", "Navigation", "Sidebar") are not specified by this specification, and might vary with the user's language, the page's language, the user's preferences, the user agent implementor's preferences, etc.
The following JavaScript function shows how the tree walk could be implemented. The root argument is the root of the tree to walk (either a sectioning content element or a sectioning root element), and the enter and exit arguments are callbacks that are called with the nodes as they are entered and exited. [ECMA262]
function (root, enter, exit) {
var node = root;
start: while (node) {
enter(node);
if (node.firstChild) {
node = node.firstChild;
continue start;
}
while (node) {
exit(node);
if (node == root) {
node = null;
} else if (node.nextSibling) {
node = node.nextSibling;
continue start;
} else {
node = node.parentNode;
}
}
}
}
ãã®ç¯ã¯éèŠç¯çã§ããã
以äžã®ææžã¯ãã¢ãŠãã©ã€ã³ã¢ã«ãŽãªãºã ã®ç°¡åãªã¢ããªã±ãŒã·ã§ã³ã瀺ããæåã«ãéåžžã«çãç« ãšãµãã»ã¯ã·ã§ã³ããã€æ¬ã®ææžã以äžã«ç€ºãïŒ
<!DOCTYPE HTML> <title>The Tax Book (all in one page)</title> <h1>The Tax Book</h1> <h2>Earning money</h2> <p>Earning money is good.</p> <h3>Getting a job</h3> <p>To earn money you typically need a job.</p> <h2>Spending money</h2> <p>Spending is what money is mainly used for.</p> <h3>Cheap things</h3> <p>Buying cheap things often not cost-effective.</p> <h3>Expensive things</h3> <p>The most expensive thing is often not the most cost-effective either.</p> <h2>Investing money</h2> <p>You can lend your money to other people.</p> <h2>Losing money</h2> <p>If you spend money or invest money, sooner or later you will lose money. <h3>Poor judgement</h3> <p>Usually if you lose money it's because you made a mistake.</p>
ãã®æ¬ã¯ã以äžã®ã¢ãŠãã©ã€ã³ã圢æããã ããïŒ
titleèŠçŽ ã¯ã¢ãŠãã©ã€ã³ã«é¢ä¿ããªãããšã«æ³šæããã
ããã¯é¡äŒŒã®ææžãããããä»åã¯åã广ãåŸãããã«sectionèŠçŽ ã䜿çšããŠããïŒ
<!DOCTYPE HTML> <title>The Tax Book (all in one page)</title> <h1>The Tax Book</h1> <section> <h1>Earning money</h1> <p>Earning money is good.</p> <section> <h1>Getting a job</h1> <p>To earn money you typically need a job.</p> </section> </section> <section> <h1>Spending money</h1> <p>Spending is what money is mainly used for.</p> <section> <h1>Cheap things</h1> <p>Buying cheap things often not cost-effective.</p> </section> <section> <h1>Expensive things</h1> <p>The most expensive thing is often not the most cost-effective either.</p> </section> </section> <section> <h1>Investing money</h1> <p>You can lend your money to other people.</p> </section> <section> <h1>Losing money</h1> <p>If you spend money or invest money, sooner or later you will lose money. <section> <h1>Poor judgement</h1> <p>Usually if you lose money it's because you made a mistake.</p> </section> </section>
ãã®æ¬ã¯ãåãã¢ãŠãã©ã€ã³ã圢æããã ããïŒ
ææžã¯ãè€æ°ã®ãããã¬ãã«ã®èŠåºããå«ããããšãã§ããïŒ
<!DOCTYPE HTML> <title>Alphabetic Fruit</title> <h1>Apples</h1> <p>Pomaceous.</p> <h1>Bananas</h1> <p>Edible.</p> <h1>Carambola</h1> <p>Star.</p>
ããã¯3ã€ã®ãããã¬ãã«ã®ã»ã¯ã·ã§ã³ããæ§æãããæ¬¡ã®ãããªåçŽãªã¢ãŠãã©ã€ã³ã圢æããã ããïŒ
äºå®äžãbodyèŠçŽ ã¯3ã€ã«åå²ãããã
h1âh6ã¢ãã«ãšsection/h1ã¢ãã«ã®äž¡æ¹ãæ··åããããšã¯ãçŽæçã§ãªãçµæããããããããããªãã
æ£ç¢ºãªåã®äŸã ãsectionã«å
ãŸããïŒæé»ã®ïŒbodyã®ã³ã³ãã³ãããã€ã以äžã®äŸãèæ
®ããŠã¿ãïŒ
<!DOCTYPE HTML> <title>Alphabetic Fruit</title> <section> <h1>Apples</h1> <p>Pomaceous.</p> <h1>Bananas</h1> <p>Edible.</p> <h1>Carambola</h1> <p>Star.</p> </section>
ã¢ãŠãã©ã€ã³ã®çµæã¯æ¬¡ã®ããã«ãªãã ããïŒ
1ã€ã®sectionèŠçŽ ã®ã¿ãããã«ãããããã3ã€ã®ãµãã»ã¯ã·ã§ã³ãçããããããã®çµæã¯çŽæçã§ãªããã®ãšããŠèšèŒããããäºå®äžãçŽåã®äŸã§æé»ã®bodyèŠçŽ ãšåæ§ã«ãsectionã¯3ã€ã«åãããã
ïŒãã®äŸã«ãããŠãæç€ºçãªèŠåºããæããªãããã"(untitled page)"ã¯ãbodyèŠçŽ ã«å¯ŸããŠæé»çã«æå®ããããïŒ
èŠåºãã¯ãä»ã®ã»ã¯ã·ã§ã³ãè¶
ããŠããããšã¯ãªãããããã£ãŠã次ã®äŸã«ãããŠãæåã®h1ã¯ãå®éã«ããŒãžããããŒãèšè¿°ããã®ã§ã¯ãªããããŒãžã®åŸåã®ããããŒã«ã€ããŠèª¬æããã
<!DOCTYPE HTML> <title>Feathers on The Site of Encyclopedic Knowledge</title> <section> <h1>A plea from our caretakers</h1> <p>Please, we beg of you, send help! We're stuck in the server room!</p> </section> <h1>Feathers</h1> <p>Epidermal growths.</p>
ã¢ãŠãã©ã€ã³ã®çµæã¯æ¬¡ã®ããã«ãªãã ããïŒ
ãã®ããã«ãarticleèŠçŽ ãnavãããã¯ã§å§ãŸããã€åã«åŸã§ãã®èŠåºããæã€å Žåãçµæã¯navãããã¯ãã¢ãŠãã©ã€ã³ã§æ®ãã®articleéšåãšåãã»ã¯ã·ã§ã³ã®äžéšã§ã¯ãªããã®ã§ãããããšãã°ãæ¬¡ã®ææžãåãïŒ
<!DOCTYPE HTML> <title>We're adopting a child! â Ray's blog</title> ... <h1>Ray's blog</h1> <main> <article> <header> <nav> <a href="?t=-1d">Yesterday</a>; <a href="?t=-7d">Last week</a>; <a href="?t=-1m">Last month</a> </nav> </header> <h2>We're adopting a child!</h2> <p>As of today, Janine and I have signed the papers to become the proud parents of baby Diane! We've been looking forward to this day for weeks.</p> </article> </main> ...
ã¢ãŠãã©ã€ã³ã®çµæã¯æ¬¡ã®ããã«ãªãã ããïŒ
ãŸãããã®äŸã«ãããŠãheaderãšmainèŠçŽ ãææžã®ã¢ãŠãã©ã€ã³ã«äœã圱é¿ãäžããªãããšã¯æ³šç®ã«å€ããã
ãã®ç¯ã¯éèŠç¯çã§ããã
| èŠçŽ | ç®ç |
|---|---|
| äŸ | |
body
| |
<!DOCTYPE HTML> <html> <head> <title>Steve Hill's Home Page</title> </head> <body> <p>Hard Trance is My Life.</p> </body> </html> | |
article
| |
<article> <img src="/tumblr_masqy2s5yn1rzfqbpo1_500.jpg" alt="Yellow smiley face with the caption 'masif'"> <p>My fave Masif tee so far!</p> <footer>Posted 2 days ago</footer> </article> <article> <img src="/tumblr_m9tf6wSr6W1rzfqbpo1_500.jpg" alt=""> <p>Happy 2nd birthday Masif Saturdays!!!</p> <footer>Posted 3 weeks ago</footer> </article> | |
section
| |
<h1>Biography</h1> <section> <h1>The facts</h1> <p>1500+ shows, 14+ countries</p> </section> <section> <h1>2010/2011 figures per year</h1> <p>100+ shows, 8+ countries</p> </section> | |
nav
| |
<nav> <ul> <li><a href="/">Home</a> <li><a href="/biog.html">Bio</a> <li><a href="/discog.html">Discog</a> </ul> </nav> | |
aside
| |
<h1>Music</h1> <p>As any burner can tell you, the event has a lot of trance.</p> <aside>You can buy the music we played at our <a href="buy.html">playlist page</a>.</aside> <p>This year we played a kind of trance that originated in Belgium, Germany, and the Netherlands in the mid 90s.</p> | |
h1âh6
| ã»ã¯ã·ã§ã³ã®èŠåºã |
<h1>The Guide To Music On The Playa</h1> <h2>The Main Stage</h2> <p>If you want to play on a stage, you should bring one.</p> <h2>Amplified Music</h2> <p>Amplifiers up to 300W or 90dB are welcome.</p> | |
header
| |
<article> <header> <h1>Hard Trance is My Life</h1> <p>By DJ Steve Hill and Technikal</p> </header> <p>The album with the amusing punctuation has red artwork.</p> </article> | |
footer
| |
<article> <h1>Hard Trance is My Life</h1> <p>The album with the amusing punctuation has red artwork.</p> <footer> <p>Artists: DJ Steve Hill and Technikal</p> </footer> </article> |
ãã®ç¯ã¯éèŠç¯çã§ããã
sectionã¯ãäœãå¥ã®ãã®ã®äžéšã圢æãããarticleã¯èªåèªèº«ã§ãããããããã©ã£ã¡ãã©ã£ã¡ãåããã ãããïŒãããŠãçã®çãã¯"èè
ã®æå³ã«äŸåãã"ã§ããã
ããšãã°ã"ããã¯ã¿ãã¿ããããéãªã³ãŽã¯ã¢ããã«ãã€ã®çŽ æŽããããã£ãªã³ã°ã«ãªã"ãšã ãè¿°ã¹ã"ã°ã©ããŒã¹ãã¹"ã®ç« ã®ããæ¬ãæ³åããŠã¿ãããïŒå€åïŒä»ã®ãªã³ãŽã®çš®é¡ã®ç« ã倿°ãããããããã¯sectionã ããã
äžæ¹ã§ãã€ã¶ãããredditã®ã³ã¡ã³ããTumblrã®ãã¹ããåã«åºåã«åé¡ãããæ°èãæ³åããŠã¿ããã"ã°ã©ããŒã¹ãã¹ãããã¯ã¿ãã¿ããããéãªã³ãŽã¯ã¢ããã«ãã€ã®çŽ æŽããããã£ãªã³ã°ã«ãªãã"å
šéšããã£ãã®ã§ãarticleã ããã
èšäºã«ãããã³ã¡ã³ãã¯ã³ã¡ã³ããããŠããarticleã®äžéšã§ã¯ãªãããããã£ãŠarticleèªèº«ã§ããã