Conditional Rendering in React Complete Guide with Examples 2026

Image
  Conditional Rendering in React Conditional Rendering is one of the most useful concepts in React. It means showing different content on the screen depending on a condition. For example: If a user is logged in → show Logout If a user is not logged in → show Login If a student has passed → show Congratulations If a product is available → show Buy Now If data is loading → show Loading... React does not have a separate if rendering tag. Instead, we use normal JavaScript conditions such as if, the ternary operator, &&, and switch to decide what should appear in the UI.

How to Create Paragraphs in HTML Using p Tag

How to Create Paragraphs in HTML

How to Create Paragraphs in HTML Using <p> Tag


html paragraph Tag

✷ The <p> tag defines a paragraph. 

✷ the Browsers automatically add some space (margin) before and the  after each <p> element. The margins can modified with the css. 

 ✷ The Paragraph element.  <p> HTML element represents a paragraph.

 ✷ Paragraphs  usually represented to the visual media as  blocks of text separated from the adjacent blocks by blank lines andor first-line indentation but HTML paragraphs can be any structural grouping of related to content, such  images or form fields.

Attribute

1) Align    :-  Left, right, centre, justify

Specifies the alignment of the text with in paragraph

How to Create Paragraphs in HTML
    Example :-


<!Doctype html>

<html>

<body>

<P align =left> is a first paragraph.this is a first paragraph Paragraphs tags or
<p> tags in HTML help us create paragraphs on a web page. web browsers is  paragraphs

<p  align=right>Paragraphs tags  <p> tags in HTML help us create the paragraphs.
on a web page. web browsersndisplay  paragraphs  as blocks of text separated from
adjacent blocks by blank lines, white spaces, or first-line indentation </p>
</body>

</html>

How to Create Paragraphs in HTML

Explain Program

Step 1 ]

<!DOCTYPE html>

  •  document type declaration.
  • browser help this is an HTML5 document.

Step 2 ]  

. <html> ... </html>

  • root element of the HTML document.
  • <html> tag is part of the web page.

Step 3 ]  

<body> ... </body>

<p>

<P>

Creates a paragraph

 

align="left" / align="right"

Aligns text  use CSS

 

<p> tag to show it as text

used to display the <p> tag as text


html paragraph Tag
  Output :-

HTML paragraph Tag

Related Post :-

html button tag

How to create a reset button form using html

C Program to print Alphabet P Pattern

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example