How to Format a Paragraph With a Box

How to Format a Paragraph With a Box thumbnail
Format your HTML data using CSS.

CSS, or Cascading Style Sheets, enables you to format HTML content -- including background color, font style and borders -- in numerous ways. For example, it lets you highlight a specific data block by outlining it or surrounding it with a box. You can format HTML tags such as "H1," "H2" and "P" with CSS, and use the CSS "border" style to format your paragraph with a box.

Instructions

    • 1

      Open the Web page that contains your paragraph.

    • 2

      Type the "style" attribute inside the "p" tag as follows: "<p style="border:2px solid orange">Paragraph formatted with a box.</p>." The paragraph is surrounded by an orange 2-pixel box.

    • 3

      Save the page and open it in a Web browser to view the style change.

Related Searches:

Resources

  • Photo Credit Pixland/Pixland/Getty Images

Comments

Related Ads

Featured