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.

CSS column-gap property


CSS column gap property

The column gap property specifies the between  the columns in flex box or multi-column layout if there is a column it will appear in the middle of  the  gap


Insert line between columns word html

Program

 <html>

<head>

<style>

.newspaper {

  column-count: 3;

  column-gap: 40px;

}

</style>

</head>

<body>

<h1>Columns Gap</h1>

<div class="newspaper">

He was a leading pupil of Indian saint Ramakrishna, who lived in the 19th century. He was a prominent player in introducing the Indian darsanas (teachings, practices) of Yoga and Vedanta to the West, influenced by Western esotericism. He is also recognized for promoting interfaith understanding and elevating Hinduism to the rank of a major world religion in the late 19th century.He played a significant role in the modern Hindu reform movements in India and helped to formulate the idea of nationalism during the colonial era.The Ramakrishna Math and Mission were established by Vivekananda.He is most remembered for his introduction of Hinduism during the Parliament of the World's Religions in Chicago in 1893, which started with the phrase "Sisters and brothers of America."

Vivekananda was born in Calcutta to an aristocratic Bengali Kayastha family and was interested in spirituality. He came under the influence of Guru Ramakrishna and through him came to understand that all living beings are incarnations of the Divine Self. Therefore, service to God is service to humanity. After Ramakrishna's death, Vivekananda traveled throughout the Indian subcontinent, gaining first-hand knowledge of conditions in British India. He later went to the United States to represent India at the 1893 World Parliament of Religions. Vivekananda gave hundreds of public and private lectures and courses in the United States, Great Britain and Europe, disseminating the principles of Hindu philosophy. In India, Vivekananda is considered a saint and his birthday is celebrated as National Youth Day.</div>

</body>

</html>


 OUTPUT

insert line between columns word html


2] Line Between the columns


Program

<html>

<head>

<style> 

.newspaper {

  column-count: 3;

  column-gap: 40px;

  column-rule-style: solid;

  column-rule-width: 1px;

}

</style>

</head>

<body>

<h1>Line Between the columns</h1>

<div class="newspaper">

He was a leading pupil of Indian saint Ramakrishna, who lived in the 19th century. He was a prominent player in introducing the Indian darsanas (teachings, practices) of Yoga and Vedanta to the West, influenced by Western esotericism. He is also recognized for promoting interfaith understanding and elevating Hinduism to the rank of a major world religion in the late 19th century.He played a significant role in the modern Hindu reform movements in India and helped to formulate the idea of nationalism during the colonial era.The Ramakrishna Math and Mission were established by Vivekananda.He is most remembered for his introduction of Hinduism during the Parliament of the World's Religions in Chicago in 1893, which started with the phrase "Sisters and brothers of America."

Vivekananda was born in Calcutta to an aristocratic Bengali Kayastha family and was interested in spirituality. He came under the influence of Guru Ramakrishna and through him came to understand that all living beings are incarnations of the Divine Self. Therefore, service to God is service to humanity. After Ramakrishna's death, Vivekananda traveled throughout the Indian subcontinent, gaining first-hand knowledge of conditions in British India. He later went to the United States to represent India at the 1893 World Parliament of Religions. Vivekananda gave hundreds of public and private lectures and courses in the United States, Great Britain and Europe, disseminating the principles of Hindu philosophy. In India, Vivekananda is considered a saint and his birthday is celebrated as National Youth Day.

</div>

</body>

</html>


OUTPUT

Line Between the columns


3] Line between the Column with colour


 program

<html>

<head>

<style>

.newspaper {

  column-count: 3;

  column-gap: 40px;

  column-rule: 5px solid lightblue;

}

</style>

</head>

<body>

<h1>Line between the Column with colour</h1>

<div class="newspaper">

He was a leading pupil of Indian saint Ramakrishna, who lived in the 19th century. He was a prominent player in introducing the Indian darsanas (teachings, practices) of Yoga and Vedanta to the West, influenced by Western esotericism. He is also recognized for promoting interfaith understanding and elevating Hinduism to the rank of a major world religion in the late 19th century.He played a significant role in the modern Hindu reform movements in India and helped to formulate the idea of nationalism during the colonial era.The Ramakrishna Math and Mission were established by Vivekananda.He is most remembered for his introduction of Hinduism during the Parliament of the World's Religions in Chicago in 1893, which started with the phrase "Sisters and brothers of America."

Vivekananda was born in Calcutta to an aristocratic Bengali Kayastha family and was interested in spirituality. He came under the influence of Guru Ramakrishna and through him came to understand that all living beings are incarnations of the Divine Self. Therefore, service to God is service to humanity. After Ramakrishna's death, Vivekananda traveled throughout the Indian subcontinent, gaining first-hand knowledge of conditions in British India. He later went to the United States to represent India at the 1893 World Parliament of Religions. Vivekananda gave hundreds of public and private lectures and courses in the United States, Great Britain and Europe, disseminating the principles of Hindu philosophy. In India, Vivekananda is considered a saint and his birthday is celebrated as National Youth Day.

</div>

</body>

</html>


OUTPUT

Line between the column with color


related Post :-

bdo tag in html

basefont tag in html

html aside tag

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example