1 / 4

Bold and Italics

Bold and Italics. Bold and Italics in XHTML. Strictly speaking, there are three different ways to bold or italicize text in XHTML:. Via CSS, using the "font-weight:bold" and "font-style:italic" styles. By using the <strong> and <em> ("emphasis") elements.

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 andItalics

  2. Bold and Italics in XHTML Strictly speaking, there are three different ways to bold or italicize text in XHTML: • Via CSS, using the "font-weight:bold" and"font-style:italic" styles. • By using the <strong> and <em> ("emphasis") elements. • By using the <b> ("bold") and <i> ("italics") elements. Do not use <b> or <i> in your XHTML documents. These are older elements that have been redefined in the newer HTML5 specification. They are mentioned here so that you will recognize them in older web pages.

  3. The <strong> and <em> Elements <p>Normal text</p> <p><strong>Text in Bold</strong></p> <p><em>Text in Italics</em></p> <p><strong><em>Text in Bold and Italics</em></strong></p> <strong> is generally used only when the enclosed text has a special meaning and should stand out on the page. One example would be a technical keyword. <em> is generally used only when the enclosed text has a special, emphasized meaning that would be spoken with a different voice inflection. We will use only CSS to bold and italicize text in this course. We won't see <strong> or <em> any further.

  4. Bold and Italics via CSS <p>Normal text</p> <p style="font-weight:bold;">Text in Bold</p> <p style="font-style:italic;">Text in Italics</p> <p style="font-weight:bold;font-style:italic;">Text in Bold and Italics</p> CSS is the preferred method of bolding and italicizing text on the page.

More Related