("emphasis") and tags. A third method is to use the and tags. These are often seen in older, existing web pages. Avoid using these, as the first two methods are now preferred.">
("emphasis") and tags. A third method is to use the and tags. These are often seen in older, existing web pages. Avoid using these, as the first two methods are now preferred.">
Download presentation Presentation is loading. Please wait.
1
Bold and Italics
2
Bold and Italic Text in XHTML:
3
Bold and Italics via CSS:
4
Bold and Italics via <strong> and <em>:
Similar presentations © 2025 SlidePlayer.com. Inc. Log in
Similar presentations
Presentation on theme: "Bold and Italics."— Presentation transcript:
We can italicize and bold text in CSS by using the "font-style:italic" and "font-weight:bold" styles. Another method is to use the <em> ("emphasis") and <strong> tags. A third method is to use the <i> and <b> tags. These are often seen in older, existing web pages. Avoid using these, as the first two methods are now preferred.
<head> <style type="text/css"> h2 { font-style:italic; } h3 { font-weight:bold; h4 { </style> </head> Heading in Italics Heading in Bold Heading in Bold and Italics CSS is the preferred way of styling text in bold and italics. <body> <h2>Heading in Italics</h2> <h3>Heading in Bold</h3> <h4>Heading in Bold and Italics</h4> </body>
<body> <h2> <em>Heading in Italics</em> </h2> <h3> <strong>Heading in Bold</strong> </h3> <h4> <em><strong> Heading in Bold and Italics </strong></em> </h4> </body> Heading in Italics Heading in Bold Heading in Bold and Italics Although considered an acceptable method for making text italic and bold, <em> and <strong> are best reserved for those situations in which there is a semantic (meaningful) difference in the text. For example, <em> is the preferred method when the text to be italicized is a book title, ship name, or foreign phrase.
Similar presentations
All rights reserved.