Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Phrase elements are designed to mark up parts of text according to their usage. Your browsers will render them in a particular way, but that's not really the point. Including your text with phrase elements helps the browser know more about the meaning of the markup. So we can do something intelligent, even in cases where it's not being displayed on the screen. Let's make a working copy of phrase.html and I'll rename this phrase-working.html. I am going to open that in my text editor. I'll just scroll down here for folks who are typing along at home. And let's go ahead and open this in the browser. I'm just going to right-click on this and open in Firefox, and there we are. So you see we have a number phrase elements here, em is for Emphasize and you see that it's rendered like this in the browser. Strong is rendered like this in the browser, dfn for Define a term is also in italics in this browser, and the way that these are displayed in this browser they may be different in a different browser. And of course, the actual presentation, you can modify with CSS, and so you can make Emphasize bold and red if you wanted to, or make Strong larger if you wanted to. These are just the way it is with this browser displays them by default. code is for Code Listings. samp is for Sample Text. You'll notice in this browser that that's also in fixed space font. kbd is for Keyboard, and var is for Variables. So these phrase elements are designed to mark up parts of text according to their usage. Remember, you can always use CSS to style these according to your preferences. Use this markup elements to convey the meaning of the markup, rather than the presentation.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98235 Viewers
61 Video lessons · 85544 Viewers
71 Video lessons · 69495 Viewers
56 Video lessons · 101838 Viewers
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.