New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

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

Up and Running with HTML
Illustration by

Emphasizing text


From:

Up and Running with HTML

with James Williamson

Video: Emphasizing text

Often, when formatting documents you're going to need to emphasize content in a specific manner. Let's take a look at a few of the ways that HTML allows us to do that. Now, I have the emphasis.htm page opened here in a browser, and you can find this in the 03_06 directory. Eventually, we'll go and edit the code for this, but I just kind of wanted to show you what we're going to be doing and to illustrate it, we are going to be working on the page that sort of explains this a little bit. We have four tags that we're going to take a closer look at.
Expand all | Collapse all
  1. 2m 12s
    1. Welcome
      55s
    2. Using the exercise files
      1m 17s
  2. 29m 30s
    1. Learning HTML
      2m 47s
    2. Choosing a code editor
      5m 2s
    3. Exploring basic HTML syntax
      8m 18s
    4. Do I need to learn HTML5?
      5m 6s
    5. Exploring HTML references
      8m 17s
  3. 35m 40s
    1. Exploring an HTML document
      5m 19s
    2. Working with doctype declarations
      4m 3s
    3. Examining the document head
      8m 20s
    4. Looking at the document body
      3m 21s
    5. Adding document structure
      8m 52s
    6. Lab: Coding a basic page
      3m 9s
    7. Solution: Coding a basic page
      2m 36s
  4. 1h 23m
    1. How does HTML format text?
      5m 51s
    2. Adding headings
      7m 24s
    3. Formatting paragraphs
      4m 54s
    4. Controlling line breaks
      3m 50s
    5. Creating lists
      10m 37s
    6. Emphasizing text
      6m 42s
    7. Displaying special characters
      5m 8s
    8. Controlling whitespace
      4m 35s
    9. Inserting images
      9m 20s
    10. Lab: Controlling page content
      13m 57s
    11. Solution: Controlling page content
      10m 55s
  5. 31m 54s
    1. Linking to pages within your site
      6m 45s
    2. Linking to external pages
      3m 2s
    3. Linking to downloadable resources
      2m 25s
    4. Linking to page regions
      8m 0s
    5. Lab: Creating Links
      5m 57s
    6. Solution: Creating Links
      5m 45s
  6. 40m 27s
    1. Examining basic table structure
      5m 10s
    2. Adding content to tables
      6m 20s
    3. Setting table attributes
      7m 42s
    4. Adding table captions
      4m 3s
    5. Defining table headers
      2m 13s
    6. Making table data accessible
      5m 46s
    7. Lab: Building tables
      4m 13s
    8. Solution: Building tables
      5m 0s
  7. 43m 23s
    1. Understanding the relationship between HTML and CSS
      4m 58s
    2. Creating inline styles
      4m 53s
    3. Exploring the style element
      5m 13s
    4. Basic font styling
      9m 24s
    5. Changing color
      4m 55s
    6. Taking styles further
      5m 24s
    7. Lab: Controlling basic styles
      5m 10s
    8. Solution: Controlling basic styles
      3m 26s
  8. 5m 44s
    1. Next steps
      2m 56s
    2. Additional resources
      2m 48s

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 ...
Up and Running with HTML
4h 32m Beginner Oct 19, 2012

Viewers: in countries Watching now:

This course is designed to quickly lead you through the steps of building an HTML website, from creating a new page to building links and tables. Author James Williamson simplifies the coding process, with straightforward steps you can recreate on your own. The course explains the basic structure of an HTML document, shows how to add text and images, and introduces font styling with CSS. James also offers a bonus design challenge at the end of each chapter, where he asks you to think of a solution before offering his own.

Topics include:
  • Choosing a code editor
  • Coding a basic page
  • Adding headings
  • Formatting paragraphs
  • Creating lists
  • Inserting images
  • Linking to internal and external pages
  • Linking to downloadable content
  • Building tables with headers and captions
  • Creating inline CSS styles
  • Changing the color and font of your text
Subjects:
Web Web Design Web Development
Software:
HTML
Author:
James Williamson

Emphasizing text

Often, when formatting documents you're going to need to emphasize content in a specific manner. Let's take a look at a few of the ways that HTML allows us to do that. Now, I have the emphasis.htm page opened here in a browser, and you can find this in the 03_06 directory. Eventually, we'll go and edit the code for this, but I just kind of wanted to show you what we're going to be doing and to illustrate it, we are going to be working on the page that sort of explains this a little bit. We have four tags that we're going to take a closer look at.

We have the bold tag, strong tag, the italics tag, and the emphasis tag, and one of the reasons that we're going to spend time on those four tags in particular is that, one, they're probably the most common tags that you'll use to emphasis content, and also they're probably the four most confusing tags in terms of why do we have four the seemingly do the same thing. So in addition to taking a look at how we're emphasizing text and how the browser is going to render that, we're going to take a look at the meaning behind these tags as well. Now we're going to start with the bold tag.

I'm going to switch over to my code. We're going to go through some of these items and bold them using the bold tag. Now the bold tag, it's had a sort of odd history in HTML. In XHTML 1.0 it was deprecated and removed from HTML, and it was obviously available in HTML 4. The reason for that is because this was a presentational tag, meaning it did nothing to your content other than tell the user agent to display in a certain way. Let's go ahead and use it on each of these terms, these definition terms here.

I'm going to go ahead and wrap all of those terms in a bold tag. So it's just B. Opening B tag, closing B tag, and again, I'm going to do that for each one of these guys. So again, it doesn't change the meaning of this text in any way at all. All it's really doing when we do this is tell the browser, or whoever's processing this page, this text needs to be displayed in bold, and there are a couple more here that I want to do real quickly.

For example, up top, where it says the bold tag is meant to represent a span of text that you wish to set apart stylistically from the rest of text without inferring any type of special relevance or meaning, right at the end of that where it says, "browsers typically bold this text," take the word bold, I'm going to wrap that in a bold tag as well. We'll do the same thing for the strong tag, which we're going to talk about in just a moment in a little bit more detail. All of this will become clearer in just a little bit, but if we go down into the paragraph underneath all of this, then you're going to see the last paragraph here we have the word cite surrounded by a left angle and a right angle bracket.

Just to its left we have the cite tag. Go ahead and wrap the word cite outside of those parentheses in a bold tag as well. So if I save this, go back to my browser, and update the page, you can see now everywhere that we apply the bold tag, all that text is now appearing as bold. But the issue here is that it doesn't really mean anything. It doesn't change the meaning. So screen readers won't inflect the text differently. Other user agents won't denote any type of meaning from this.

It's just simply presentational. Now, contrast that with the strong tag. Now, as the text says, the strong tag, when you use it you're representing the text that's inside of it as having strong importance. Now, what that means is if someone were talking about it, for example, that would change their vocal inflection or the text itself has a little bit of a different meaning. Let's go ahead and use that. I'm going to scroll down to this paragraph right here where we sort of discuss those differences, where it says "you're probably wondering why they're multiple texts for bolding and italicizing text.

If you are, don't worry. You are not alone." So you're not alone. We want that to be very strongly emphasized. You're not alone. You know we want people to know that we're out there and we're with you. So in order to do that, we're going to surround that with a strong tag. So I'm going to do everything including the exclamation point there. So now if I save this and I go back into my browser and refresh this, we can see that you're not alone is now represented as being bold, and that's where the confusion sets in. Most people say, well, the same thing. Nothing happened.

But it's not really the same thing, and here is the easiest way to sort of denote that difference. And if you read through the paragraph, you'll kind of get this from the paragraph as well. But essentially, if you can imagine the text being formatted some other way--maybe underlined or highlighted or made a little bit larger or changed in some way--just because you want it to be strongly emphasized to the people that see it, then a bold tag is not appropriate and it should be a strong tag. On the other hand, if all you want to do is bold it and you don't care that any additional meaning is passed along-- you're just changing the formatting-- that's when you use the bold tag.

The same can be said for the italics tag and the emphasis tag. So instead of dealing with bolding text, we're dealing with italicizing it or emphasizing it. For example, I'm going to take the word italics at the end of the italic tag here and I'm going to wrap that it in an I tag. So that's italics, and I'm going to do the same thing in a paragraph here for the emphasis tag. I'm going to go ahead and right here on this line where it says "although this tag is usually rendered in italics," I am going to italicize that. Now, contrast that with the need to emphasize text.

So the em tag stands for emphasizing text. It's typically in a browser displayed as emphasis, but through the use of CSS, I can change it to whatever I want. So if I come down to this bottom paragraph, one set of tags is presentational while the other is logical. I want to emphasize the word presentational and logical to make sure that people are really paying maybe a little bit more attention to those particular words. So I'm going to take presentation and logical and I'm going to wrap them in an em tag. The same thing here for logical.

Save that and again preview it in my browser. You can see, visually it doesn't really look any different. We have italics up here, we have italics here, and then presentational and logical are displayed in italics as well. But we know that behind the scenes, structurally, there is a difference between those tags. Don't worry. If the difference between them isn't crystal clear to you at first, just research these tags as much as you can, pay attention to how authors use them as well. So look at other people's pages and code and see where they use em in place of italics or where they use italics in place of em.

Over time you're going to develop a use case for when you should use one of the elements over its counterpart.

There are currently no FAQs about Up and Running with HTML.

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

join now 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 Up and Running with HTML.

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

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.