Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Font weight is essentially the CSS property that determines whether text is bold or not. Although the CSS specification calls for a much wider spectrum, ranging from ultra thin to very thick, there is virtually no browser support for these variations. There are only two values for the font weight property that work reliably across all browsers; Normal and Bold. Dreamweaver does however provide a variety of methods for applying those values. So I have open here the tours.htm file from the Chapter 5 > 05_01 folder, and first I want to make sure you understand the difference between the two B buttons on the Property Inspector.
So if you look down at the Property Inspector you'll see a B and I buttons, you would think those would be Bold and Italic, and we're in the CSS tab. Now let's flip over to the HTML tab, and again, we have a Bold and an Italic, but they do very different things. So let's go ahead and demonstrate that by double-clicking the word exciting in the first paragraph and then clicking B for Bold. You can see that the word actually does become bold, and then if I click into it you can also see in the Tag Selector that an additional tag was added.
This is the strong tag, which by default makes text bold. You can of course redefine that if you want to make text red, italic or just about anything. The rationale behind this is that because we're on the HTML tab, an HTML solution to boldness is added. Alright, let's go to the CSS tab, and this time I'm going to go ahead and put my cursor into the All Tours navigation that you see over here, and if you take a look over at the CSS Styles panel, you can see that it's actually being applied to the current class to indicate that this is the page that you're on the All Tours page, and in our Property Inspector we can see that same rule is highlighted there.
So now if I wanted to make the current class always be bold, I would go over to the B button or Bold button while I'm in the CSS tab and click it, and now if you look at it, you can see that yes, in fact it has been made bold and the font-weight bold property has been added. Now if I turn it off and then click in there again, you can see that the font-weight property is gone. One more time, I'll just turn it on and font-weight is added. You'll find that the Property Inspector's CSS mode is really a handy way to toggle font-weight bold on and off.
But sometimes you need to expressly change the font-weight to non-bold or normal. For that you'll need to use another method. So let's scroll down to the tour descriptions, and here we have the h2 tag that leads off all of the tour descriptions. Let's scroll down a little bit further so you can see another one. Now by default all headings are depicted as bold, but if we wanted a slightly thinner approach for our h2 tags, we would have to set the font-weight property to normal. Now you can do that directly in the CSS Styles panel, but if you're new to CSS you may not be familiar with the syntax, so let's go in to the CSS Rule Definition dialog box by clicking Edit Rule at the bottom, and we'll go to the Type category and from Font-weight choose normal.
I'll click OK, and now you can see that the h2 tag has gotten a little bit thinner, and if you look over at the shorthand for the font values you can see that normal has been added. Of course, as you become more and more familiar with CSS you can go ahead and add that or subtract that by hand. Now although Browser support for the other font-weight values is pretty much nonexistent, I think it's nice that Dreamweaver is already set up to make those options available when they do come into play.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
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.
Your file was successfully uploaded.