Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
In XHTML and HTML Essential Training, Bill Weinman helps designers and coders understand XHTML and HTML. In the process, Bill covers document structure, block and inline-level tags, floating images, controlling white space, phrase and font markup, and tables and frames. He even provides a good introduction to CSS. Bill offers step-by-step guidance for building a complete working web site. Exercise files accompany the course.
In the last lesson we saw how to change the font face of text using the font markup tag and now we're going to look at how to change the size of the text using the font markup tag. So here we have the same paragraph and I'm going to go ahead and insert a font tag. We'll use the size attribute. I'm going to close the font tag here. We'll say size = "3", 3 is the default size. So when I save this and reload it in the browser, we won't see any change at all.
If I go ahead and make it 4, so it gets little bigger. Save, reload, there it is. If I make it 2, I'll see that it gets little smaller. Go ahead and save that and reload. And we have now smaller text. So 3 is the default and numbers between 1 and 6 are valid. So 1 is very, very small. We'll look at 1. Save, reload. That's very, very small. And we'll look at 6, which is very, very big.
Save here and go ahead and reload and 6 is very big. Besides using the absolute numbers, you can also use relative numbers. If I say +1, it will make it one size larger than what it's current, which is the default. So it's just that bigger font, it's just like 4. If I say -1, it will make it one smaller than what's in effect at this place of the document, which is the default in this case. So it makes it smaller. So you can use relative sizes and you can use absolute sizes. I tend to like the relative sizes more.
So I'm going to ahead and set this to + 1, and then I'm just going to show you one more thing we can do here. We can combine the face and size attribute. So if I say face="sans-serif" and save that, you will see that we'll get a sans-serif font that's a little bit larger than the default. So that's the font size tag, and you see you can use it also in combination with the font face tag. Remember that the font tag is an inline tag, so it belongs inside of the paragraph not on the outside of the paragraph.
Find answers to the most frequently asked questions about XHTML and HTML Essential Training.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
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.