Block Elements
There are several primary block elements used in HTML5. We will look at some new and old tags that complement the <head> and <body> duo.
- <header>
- <nav>
- <article>
- <aside>
- <footer>
- <blockquote>
<header>
The <header> tag is a container for introductory materials in a document or section. <header> can be used multiple times in a document and usually contains at least one <h1>-<h6> element (in order to validate).
<header> <h1>Section/Document Header</h1> <p>A brief description of this section/document</p> </header>
Further reading:
- HTML5 Doctor: The <header> Element
- w3schools: HTML5 <header>
<nav>
The <nav> tag is used to demarcate a section containing navigation anchors (links) to other content or sections. The anchors can be nested within a list such as an unordered list <ul>.
<nav>
<h1>Navigation</h1>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#contact">Contact Us</a></li>
</ul>
</nav>
Further reading:
- w3schools: HTML5 <nav>
- HTML5 Doctor: <nav>
- w3c: <nav> Specification
<article>
The <article> tag designates a region of a document that is self-contained. <article> can be an article, blog post, news story, etc.
<article> <img src="image.webp" alt="An image." /> This is the content for the article. </article>
Further reading:
- HTML5 Doctor: The article element
- w3c: The article element
- w3schools: HTML5 <article>
<aside>
The <aside> tag contains information that is tangentially related to to the primary content. Examples can include anecdotes, sidebars, external links, keyword definitions, etc.
<article>
<p>This is an article HTML5</p>
<aside>
HTML5 is often used in conjunction with CSS and JavaScript.
</aside>
</article>
Further reading:
- HTML5 Doctor: Aside revisited
- w3c: The aside element
- w3schools: HTML5 aside tag
<footer>
The <footer> element is located at the end of a content section, such as <html>, and will contain information including licensing details, addresses and contact information, and links to site-wide documents such as a community aggreement.
<html> <article>Article content.</article> <footer> Creative Commons license. </footer> </html>
Further reading:
- HTML5 Doctor: The footer element
- w3c: The footer element
- w3schools: HTML5 footer tag
<blockquote>
The <blockquote> tag is used to indicate a quotation or citation. The cite attribute is used within a <blockquote> tag to reference the origin of the quote.
<blockquote cite="Caleb">on the last element you listed 'bockquote', should be blockquote</blockquote>
Further reading:
- w3c: The blockquote element
- w3schools: HTML5 blockquote tag
Task
- Put together a news article using each of the above tags and any tags described in previous tasks.
- Post a link to your news article in the discussion area below.
- Be sure to review each others' news articles and comment on techniques and content as desired :-)
Hint: Use the following diagram as an example of how block elements are nested.
Note: CSS is required to obtain the layout in the following diagram.
![]()
Task Discussion
-
-
-
Al said:
The <aside> element wasn't working right for me, I checked out the soure of your page and saw what I was doing wrong.
+1 to you!
-
Pau Company said:
Pau Company said:
Muchas Gracias. Si te puedo ayudar en algo, ya sabes como contactarme. Atentamente:
Pau Company
-
Mr. Plow said:
I think your link has an extra "%20target=" in the href. I removed that and viewed your layout- it looks great!
JuanMa Ruiz said:
Thanks for yours comments. I changed the link and now it works.
-
Mr. Plow said:
Here is my effort toward learning to use block-level elements.
I hijacked lots of CSS to make the layout remotely close to the example but didn't have time to figure out why the articles layout extends all the way to the edge. Also, colors and fonts are ugly and unimaginative, but learning CSS is something that happens later :)
-
alcinoe said:
Here's mine.I had some trouble with the CSS. The border and background around the blockquote are conflicting with the aside. Does anyone know how to fix this? I do not want to float left the paragraph to the left of it - I want the paragraphs to flow around the aside.
demian said:
I don't know any solution to your problem, but I love the color and style. You have such a good sense of colors
Vita said:
Did you try to put the <aside> after the <blockquote>...? Dont know really, might help but I'm not sure... The overall layout and colors look great by the way...

Indie Media Project said:
If you remove the <p> tags within the <aside> part it should fix it although you shouldn't have to so I'll try and find a better solution.
Indie Media Project said:
If you apply "overflow: hidden;" to "blockquote" in your CSS it also works.
alcinoe said:
Thank you very much, Indie. It worked perfectly!
Elizabeth
-
Vijayendra said:
I have added my work with Block Elements at the following link http://htmlpad.org/Html5-NewsArticle-Layout/
-
Vita said:
Here's my example for Block Elements, I made a news page with the given layout. Check it out and tell me what do you think...

http://dl.dropbox.com/u/18761433/HTML5Course/blockelements.html
demian said:
Nice work, but the text runs outside. I attach the screen shot of your page in FireFox.
alcinoe said:
Nice Job. It looks fine for me - Firefox 7.0.1 on Windows.
alcinoe said:
I just updated to Firefox 8.0.1 and it still looks fine
demian said:
I use FireFox 8 also. How come it doesn't come out fine for me?.... Have you tried all tags?
Vita said:
I may have an idea of the problem, trying to fix it now, will let you know after, thanks you guys!
Vita said:
Ok, so... Coming back to my news page I found the mistake that I made - I've put fixed heights on my <p>'s and that might be the reason for text to run out of the paragraph area. I am also using FF8 on Windows, but I am also working on Windows8 Developer Preview and this is not the first time when I am having this kind of difference. Anyways, I also tested the page using Expression Web 4 Super Preview and to me it looks fine in most of the new browsers that support HTML5 new elements.
I would realy appreciate if you could try to look at it again and let me know if my fixed heights for paragraphs was the problem and if it is looking better now.
Thank You,
Vita.
demian said:
Great job fixing, Vita! Your page looks perfect now; no more running out

Vita said:
Thanks Demian. And thank you also for the "bug report"...!!!

-
jenEliz said:
Task: Either visit my continually updated site: Witches and go to the bottom where the "Articles" area is; OR, go straight to my completion of the task: Witches in the News
For the CSS code, I followed the page source of a the previous comment that completed the colored table. Also, put my own content in there to make it relevant to the original webpage. I will continue to update both!
If anyone has any ideas for formatting pictures to fit in an aside (such as my oversized picture...) please let me know (though, I'm assuming this is a more complex CSS task)!
-
skullkandy09 said:
I dont understand the <nav> and <aside> tags. Does <aside> come inside the article tag or <p> tag or what? And where does the <nav> tag come? Sorry if my questions are stupid, im only 12 yrs old
dtkindler said:
I don't have the answer to that question, having only begun this class myself, but wanted to say that those are awesome questions just because you are 12 yrs old. I'm 46 and think that it's great you're taking the initiative to learn HTML 5.
joe palmer said:
Considering the nav tag, if you did not use it in a saved .html document that you make in your editor and than put on a browser, you will not see any change by using it. However it is important for other “user agents” as they are called now, such as a phone. Note browsers are being called user agents now too.
Nav is for navigating around a list of choices, such as in a footer like "home" "contact us" "subscribe" where the user can click a link. If we view source, we notice it where ever the user has some choices to click on, even just one link. Lets talk how to view the source code of a web page just to be sure we are doing that to see what others have done- it is a great way to learn. To view source, go to the select View from the tool bar, and select page source, a new window will open which will show the source code, you cannot change it unless you are using the free tool called Firebug from Mozilla to use in Firefox. If you had that tool, you could change the HTML, CSS and even the Javascript to see what effect your change would have and you would see what your change looks like, a very powerful learning tool. If you have the newest version of Firefox, you will notice that they removed page source view, what you do now (and I think this works for the older versions also) is you hit the control key, hold and hit the u key (that is called a shortcut, Google shortcut keys and you would find lots of them!)
When viewing source do not be discouraged at seeing many computer (more correctly software generated) generated code out there. Developers still go into them to make a change to the code that the software is not expressing to the user agent on its own. It is really fun when you view the source of a totally hand written site, such as this one which I picked because it is an educational one for a reader of it- http://themaingate.net/
He could have used the nav tag in his listed hrefs, but his purpose is served, it is a beautiful site, we just have to note about anything can usually be better.
The aside tag is for when you know the content should be aside, or off to the side (not always) of the main content. Here is a guy using it wondering if it is a good way to do something, the conversation is enlightening. http://stackoverflow.com/questions/6109027/can-the-header-tag-be-contained-within-the-aside-tag-in-html5
Here are some more links about the aside
http://webdesign.about.com/od/html5tags/p/bltags_aside.htm
This useful link is almost like someone is in the room teaching you!
http://www.pvmgarage.com/2010/04/touch-the-future-create-an-elegant-website-with-hmtl-5-and-css3/
I will get to the other question tomorrow, but for now a few things on the keyboard like the copyright symbol do not render or show on a user agent if you use them, so they have special ways of being keyed (typed / written) onto the document.
-
Wesley Pennock said:
Wait a minute how do we figure out the CSS for this and where exactly do we put "section" in our html5 document?
Michael said:
One way would be to view the source code (via right-click).
Michael said:
One way would be to view the source code (via right-click).
Brylie Oxley said:
We haven't covered CSS yet. I was just pointing out that the layout would not be possible without using CSS. Are you ready to delve into a little bit of CSS?
The <section> is located anywhere within the <body>.
-
Albert Rosa said:
I have layed out the page as instructed no real content outside of lorem ipsums
http://htmlpad.org/html5blockElements/
Now this looks much better in chrome than it does in FF.
-
(aleb said:
When would be best to use an 'Ordered' list versus an Unordered list?
Btw, under the nav section, I think on the last element you listed 'bockquote', should be blockquote, unless of course, I'm missing something.;-)
Thanks,
(aleb
Brylie Oxley said:
Discussions regarding <ol> and <ul> can be posted here.
Ordered lists are for ordered sequences, e.g. steps to open a can. Un-ordereed lists can be for non-sequential lists such as a birthday wishlist.
