Start learning with our library of video tutorials taught by experts. Get started

HTML5: Structure, Syntax, and Semantics

Citing works semantically


From:

HTML5: Structure, Syntax, and Semantics

with James Williamson

Video: Citing works semantically

Sometimes even minor changes to a specification will cause problems, such as the case with the cite element. Now, if you're not aware of the cite element or the changes that have been made to it in HTML5, don't worry; its focus is pretty narrow, and there's a good chance that you probably just never needed it before. However, it does provide us with a chance to give our content even more semantic meaning, so it, and the changes that have been made to in HTML5, are worth looking in to. I'm here in the HTML5 specification, and I've navigated to the cite element.
Expand all | Collapse all
  1. 2m 20s
    1. Welcome
      48s
    2. Using the exercise files
      1m 32s
  2. 19m 7s
    1. A brief overview of HTML5
      3m 57s
    2. What's in the HTML5 specification?
      8m 17s
    3. Why do we need new structural elements?
      6m 53s
  3. 50m 33s
    1. Defining HTML5 documents
      5m 5s
    2. HTML5 syntax
      9m 14s
    3. The header element
      5m 22s
    4. The nav element
      4m 55s
    5. The section element
      4m 51s
    6. The article element
      4m 48s
    7. The aside element
      4m 13s
    8. The footer element
      4m 17s
    9. Content model overview
      7m 48s
  4. 35m 28s
    1. Understanding the outline algorithm
      3m 17s
    2. Creating document sections
      8m 25s
    3. Using headings properly
      9m 1s
    4. Using hgroup to override sectioning
      4m 17s
    5. Properly nesting structure
      7m 17s
    6. Sectioning roots
      3m 11s
  5. 58m 30s
    1. Organizing content
      4m 41s
    2. Planning document structure
      5m 47s
    3. Choosing the right structural element
      4m 43s
    4. Checking document outlines
      5m 27s
    5. Coding initial page structure
      5m 28s
    6. Using class and ID attributes
      5m 31s
    7. Structuring headers
      13m 13s
    8. Building navigation
      7m 1s
    9. Structuring footers
      6m 39s
  6. 1h 27m
    1. Working with figure and figcaption
      7m 12s
    2. Grouping content with asides
      3m 46s
    3. Using divs in HTML5
      5m 0s
    4. Working with lists in HTML5
      7m 10s
    5. The return of bold and italic
      5m 52s
    6. Citing works semantically
      6m 32s
    7. Using the address element
      5m 24s
    8. Using the small element
      4m 24s
    9. Using the mark element
      5m 16s
    10. Working with date and time
      11m 55s
    11. Creating block-level links
      8m 53s
    12. Understanding link relationships
      9m 28s
    13. Defining link relationships
      6m 23s
  7. 17m 22s
    1. Current browser support
      7m 38s
    2. Ensuring block-level display
      4m 3s
    3. Adding support for elements in older browsers
      5m 41s
  8. 3m 46s
    1. Additional Resources
      3m 46s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
HTML5: Structure, Syntax, and Semantics
4h 34m Beginner May 31, 2011

Viewers: in countries Watching now:

Gain a deeper understanding of HTML5 and learn how to create richer, more meaningful web pages with structural tags and descriptive attributes. In this course, author James Williamson presents an overview of HTML5 and its development, defines the new tags and attributes, and discusses how browsers parse and display HTML5 content. The course also includes step-by-step instructions for constructing an HTML5 document with a header and footer, navigation, content groups, and formatting.

Topics include:
  • Defining basic elements
  • Exploring the content model
  • Creating document sections
  • Using hgroup to override sectioning
  • Using the proper nesting structure
  • Choosing the right structural element
  • Using class and ID attributes
  • Building navigation
  • Grouping content with asides
  • Using divs in HTML5
  • Creating block level links
  • Defining link relationships
  • Understanding current browser support
  • Adding support for elements in older browsers
Subjects:
Developer Web Web Design Web Foundations Programming Languages Web Development
Software:
HTML
Author:
James Williamson

Citing works semantically

Sometimes even minor changes to a specification will cause problems, such as the case with the cite element. Now, if you're not aware of the cite element or the changes that have been made to it in HTML5, don't worry; its focus is pretty narrow, and there's a good chance that you probably just never needed it before. However, it does provide us with a chance to give our content even more semantic meaning, so it, and the changes that have been made to in HTML5, are worth looking in to. I'm here in the HTML5 specification, and I've navigated to the cite element.

I want to take a look at what the specification has to say about it, so I'm just going to scroll down to look inside the definition. So what the definition says: "The cite element represents the title of a work," and then it gives a couple of examples of those, books, papers, poems, paintings, things like this. Now this can be a work that is being quoted or referenced in detail, i.e. a citation, or it can just be a work that is mentioned in passing. Okay, that doesn't sound all that controversial, does it? Well, it's the second paragraph that's causing some problems. So, let's read that. "A person's name is not the title of a work -- even if people call that person a piece of work." So I've never read a specification that's kind of snarky, but this one is.

"The element must therefore not be used to mark up people's names." So what's the problem with that? Well, that's not what the spec said in HTML 4, and in fact, authors have been using cite when quoting or, citing, if you will, author's names for quite some time now. That means that the HTML5 specification is now making past usage of the element non-conforming. This goes directly against what the specification was supposed to do, which was to ensure backwards compatibility.

Now, as a result, many well-respected authors and I guess some non-well- respected authors like myself are simply telling people to just ignore the specification and keep using it the way they've always used it. Hmm, don't you just love the evolution of the web? Now, exactly how you use the cite element is up to you as an author. For our Trails page, we're going to go ahead and use the cite element, along with a few others, to add a little bit more semantic richness to our document.

So here we are, back in our Trails file, and this one you can find in 05_06 directory. I want to scroll down a little bit and I can see at about line 68 or so, we've added some content to our Trail Review. And this content is not currently marked up, so that means we're going to have to mark it up. Okay, so we can see that the content says, "Northridge Loop is easily the best loop in Ojai! You'll kick yourself if you miss it!" Apparently, that is Nick Brazzi's opinion, and that is coming from his latest book, The Complete Guide to Trails.

Okay, so this is definitely a work that we're citing from, and it's a quote. So there are a couple of things going on here. Number one, I don't want this information to show up in the document outline. Number two, it's definitely not part of my main body of text, so I need to start at least, not a new section, but it needs to have some means of identifying itself as being related to, but separate from, my main text. Well, a good candidate for use here would be a sectioning root element whose internal structure is hidden from the document outline, and the one that really immediately comes to mind with this is blockquote, and I think blockquote would be perfect here.

So what I'm going to do is just in front of this line of text, I'm going to go ahead and wrap this entire quote, both lines of it, with a blockquote tag. Cool! Okay, now the next thing I want to do is structure the inside of the blockquote, again to sort of denote the meaning of everything that's going on here. The first line that I look at, "Northridge Loop is easily the best loop in Ojai! You'll kick yourself if you miss it," that's a quote, and there is definitely an element that is built specifically for this purpose and that would be the quote tag.

So I'm going to go ahead and use the q tag here. Now if you've never used the quote tag, it's actually been around for a little while, and it does just that; it identifies its contents as being a quote from somebody. What's really nice about this, other than just the semantic meaning we get from using the tag, is in the browsers, most user agents will go ahead and place the quotation marks there for you, so that's not something you have to do yourself, or worry about placing in there, which is really nice. Now I need to take a look at the rest of the blockquote, the remaining line which is Nick Brazzi, and then the work of his that we're citing from.

Here, I want to add a little bit more structure to my blockquote, and your blockquotes can have as much or as little interior structure as you want. When I take a look at what's happening here, this is some information that is identifying the author of the quote itself. And if we look at a semantic tag that allows us to give information about the author of something, then the footer comes to mind, and footer is absolutely perfect for this. So what I'm going to do is right here in front of Nick Brazzi, I'm just going to go ahead and open up a footer tag.

Then I'm going to wrap this whole line, and I'm just going to go ahead and offset this so that you can really see the structure of it. So now our author's name and the work is inside a footer which is inside the blockquote. So it gives some information about what that content is and how it relates to the rest of the blockquote. Now, the last thing we want to do is we want to go ahead and use the cite element. And despite what I said-- yes, we could use it on the name-- but despite what I said, I want to do it in conformance with a specification. So what I'm going to do is right here for The Complete Guide to Trails, I'm going to go ahead and use the cite element right there.

I'm just going to go ahead and wrap The Complete Guide to Trails, which is the work, in the cite element. So I'm going to go ahead and save this, and I'm going to preview that in a browser. Now, as I scroll down, cool, I can see our blockquote. You can see that the quote element is going ahead and the browser is adding quotation marks for us, which is very nice. The other thing that the footer does, other than identifying the author information for the particular blockquote, is it gives us another styling hook, so we're able to style the blockquote one way and the footer in other, and it gives us sort of a nice visual effect here as well.

So blockquote, quote, and cite, all three of those give us some really powerful tools when quoting or citing from other works. Now, how you use these elements is, again, entirely up to you as an author. Just make sure that you're familiar enough with the specification, so that the meaning that the elements impart matches the meaning that you're trying to convey.

There are currently no FAQs about HTML5: Structure, Syntax, and Semantics.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed HTML5: Structure, Syntax, and Semantics.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked