1 / 4

Bold and Italics

Bold and Italics. Bold and Italic Text in XHTML:. 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.

cecily
Download Presentation

Bold and Italics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bold and Italics

  2. Bold and Italic Text in XHTML: • 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.

  3. Bold and Italics via CSS: <head> <style type="text/css"> h2 { font-style:italic; } h3 { font-weight:bold; } h4 { font-style:italic; font-weight:bold; } </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>

  4. Bold and Italics via <strong> and <em>: <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.

More Related