Syntax rules and syntax style


Syntax Rules

My note taking from this Article

— changing these so that headers, navigation, footers, main content, etc are their own separate entity that can be stylized

<header>: Used to contain the header of a site.

<footer>: Contains the footer of a site.

<nav>: Contains the navigation functionality for the page.

<article>: Contains a standalone piece of content that would make sense if syndicated as an RSS item, for example a news item.

<section>: Used to either group different articles into different purposes or subjects, or to define the different sections of a single article.

<time>: Used for marking up times and dates.

<aside>: Defines a block of content that is related to the main content around it, but not central to the flow of it.

<hgroup>: Used to wrap more than one heading if you only want it to count as a single heading in the page’s heading structure.

<figure> and <figcaption>: Used to encapsulate a figure as a single item, and contain a caption for the figure, respectively.

<!-- <p class="note">Note: The elements covered in this article are all supported in Opera 11 beta, except the <code>&lt;time&gt;</code> element, but this will follow soon.</p>
	<h3 id="how-decided">How were the element names decided upon?</h3>

Syntax Style

Notes taken from this article

  • Use all lower case
  • Always use quotes on attributes
  • Don’t close standalone tags (ex: meta, img, input, source) just use > no />
  • Close ALL elements that have content
  • Don’t quote boolean or standalone attributes

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s