p html code

The p element in HTML stands for "paragraph" and is used to represent a block of text as a paragraph. It is a block-level element, which means that it creates a separate block of content that is distinct from other elements on the page.

Here is an example of how you might use the p element in HTML:



    <p>This is a paragraph of text.
        It is contained within a p element.</p>

   

The text inside the p element will be displayed in the browser as a paragraph, with each line of text being separated by a line break.

You can also style the text inside a p element using CSS (Cascading Style Sheets). For example, you might use CSS to change the font size, color, or font family of the text.



<style>
  p {
    font-size: 18px;
    color: blue;
    font-family: sans-serif;
  }

 </style>

<p>This paragraph will be displayed in blue,
with a font size of 18px and a sans-serif font.</p>




Reactions

Post a Comment

0 Comments