How to Italicize in HTML Text Without Tags

How to Italicize in HTML Text Without Tags thumbnail
Use CSS instead of tags to create italicized text.

Traditionally, HyperText Markup Language (HTML) Web pages are styled with code known as "tags." These tags appear before and after the intended text to produce a formatted effect such as italicized font. While this code still works, consider using Cascading Style Sheets (CSS) to achieve the same effect. This way, you save time while coding and you enable a browser to display your page quicker. Using your computer's text editor program, use CSS to italicize your HTML text and bypass the need for tags.

Instructions

    • 1

      Launch your text editor program and open an existing HTML file or begin a new one.

    • 2

      Place your cursor between the "<head></head>" tags in your document. If your text editor does not provide the initial code that creates a basic Web page, type the following:

      <html>

      <head>

      <title>Web Page Title</title>

      </head>

      <body>

      </body>

      </html>

    • 3

      Enter the CSS code that creates a placeholder for your italics style rule:

      <head>

      <style type="text/css">

      </style>

      </head>

    • 4

      Position your cursor between the "<style></style>" elements. Type in an HTML tag and follow this with a style rule that automatically italicizes the desired text. For example, make all of your paragraphs appear in italics by entering the following code:

      <style type="text/css">

      p { font-style: italic; }

      </style>

    • 5

      Save your document. Going forward, your HTML paragraph text is always italicized without any further work needed on your part.

Related Searches:

References

Resources

  • Photo Credit information image by Soja Andrzej from Fotolia.com

Comments

You May Also Like

Related Ads

Featured