Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

The return of bold and italic

From: HTML5: Structure, Syntax, and Semantics

Video: The return of bold and italic

One of the things that HTML5 is causing me to do personally is to go back and eat some of my previous words. Now, for years, I've been telling students not to use the bold and italic tags. Those tags were deprecated in XHTML 1.0 as being purely presentational, and their use was discouraged on those grounds. However, the tags were still found in the HTML 4 specification and have been updated in HTML5 to further clarify when bold and italic tags should be used in place of, say, the emphasis and the strong tag.

The return of bold and italic

One of the things that HTML5 is causing me to do personally is to go back and eat some of my previous words. Now, for years, I've been telling students not to use the bold and italic tags. Those tags were deprecated in XHTML 1.0 as being purely presentational, and their use was discouraged on those grounds. However, the tags were still found in the HTML 4 specification and have been updated in HTML5 to further clarify when bold and italic tags should be used in place of, say, the emphasis and the strong tag.

Let's take a quick look at the specification. I'm going to start here with the bold element. So just to go down and read the description of this, "The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or a mood," so again, purely presentational, not semantic or structural in any way. So key words in a document abstract, product names in a review, actionable words, things like that, but nothing that you're trying to emphasize particularly. Okay.

Let's take a look at the italics tag now. So this is the i element, italics element. The i element represents a span of text in an alternate voice or mood. So this is a little bit more complicated here. A span of text in an alternate voice or mood, an otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, those types of things. Now you might say, well, wait a second, a span of text in an alternate voice.

That sounds a lot like the em tag, and honestly, in some ways, this is still presentational. It's still going to italicize the text. But in some ways, it kind of is taking over that little bit of a role. Let me contrast that with the emphasis tag. So this is the em element. The em element represents a stress emphasis of its contents. Okay, so there is your difference. The italics tag is text in an alternate voice, where the emphasis tag is where we're stressing the emphasis of its contents.

So there really is a semantic difference between those two. Just an alternate voice might be a way of basically changing the phrasing of the text, whereas the emphasis tag shouldn't be used just to italicize, but to emphasize its contents. And the strong element gives a very similar description, noting that strong represents the level of importance of the content. So it's stressed even more. So really what this boils down to is when you encounter a situation where the normal typographic treatment would be to either bold or italicize the content, you're free to go ahead and use the bold or italics tag.

Now in situations where you want to affect the meaning of the content or stress its importance, then the emphasis tag and the strong tags really should be used over those tags. And in a lot of other cases, CSS is going to be able to do the job for you. So what we're going to do is we're going to take those lines of thought back to our trails page and take a look and see if there's any text in there that would benefit from the bold or italics tag. All right! So we're back in our trails.htm page, and this particular one can be found in the 05_05 folder.

And I want to focus really on the footer, so I'm just going to scroll down till I get to all the way down to the footer content. So when we look at the footer content, we have the right column which was returned to top, the telephone number, the email address. And then the left column has all our copyright information, the Explore California address, and all of that, and the 24-hour support line. So how about Explore California? That's the name of the company. I would really like that to be a little bolder, say. So what I'm going to do is I'm just going to go ahead and wrap that, in order to do that, in a bold tag.

Now you might be saying well, why not use the strong tag here? Wouldn't that really strongly emphasize Explore California and set it apart from the rest of the address? Both yes and no there. You can certainly do that. You can make the case for that, but the other thing to remember too is that Explore California is in a separate paragraph as the rest of your address. So visually, it would certainly stress the importance of it, but it really doesn't stress the importance of it outside any other content because it is the only content within this paragraph. So in this instance, the bold tag works fairly well. Now, going back down to our telephone numbers, I notice here that I have '24 hour support' right after this phone number.

And I don't really need that to be stressed any more than this. I don't really need that to be emphasized, but I do want it to be italicized. Now if I was going to use CSS to do this and I didn't want to use the em tag, I'd probably end up surrounding it with the span tag anyway. So it's not like I'm not going to have any additional markup here. So I'm just going to go ahead and use the italics tag to do that. So I'm going to use the i tag and surround '24 hour support'. I'll go ahead and save that, and I'm going to preview that in my browser to kind of see how that looks.

And once I'm in my browser, I'm just going to sort of scroll down here, and sure enough, Explore California is in bold and '24 hour support' is being italicized, which is exactly what we want. Now I could also go ahead and italicize the legal data here, but we have some other plans for that. So we'll come back to that in a little bit. So even though it is kind of taking me a little bit of time to get used to using the bold and italics element and the fact that they're viable options again, they do provide us with additional options when describing your document's content.

Now there are some of you out there who are probably committed to not using these elements because of their presentational nature, and I've got to tell you, that's fine. As with many other elements in HTML5, you choosing to use them to identify your content or not is totally up to you as an author. You should, however, be aware that the choice is available to you and that both of these tags are indeed valid HTML.

Show transcript

This video is part of

Image for HTML5: Structure, Syntax, and Semantics
HTML5: Structure, Syntax, and Semantics

46 video lessons · 36627 viewers

James Williamson
Author

 
Expand all | Collapse all
  1. 2m 20s
    1. Welcome
      48s
    2. Using the exercise files
      1m 32s
  2. 18m 41s
    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 27s
  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

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

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.


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.

Join now "Already a member? Log in

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
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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.