How To Create A Triangle Using HTML and CSS?


STEP 1: Add <div class="triangle"></div> in the HTML document.

STEP 2: Add this CSS code.

.triangle{ 
 position: absolute;
 border-width: 50px;
 border-style: solid;
 border-color: transparent transparent black transparent;
 }

 

OUTPUT

 







Trending Posts

8 Characteristics Of Modern Computer

60hz vs 90hz vs 120hz | Which One is Best? | What is Refresh Rate?

The Impact of Artificial Intelligence (AI) on Web Development

How To Protect Your Phone From Being Hacked? | 8 Ways To Protect Smartphone From Being Hacked

Brief History Of Computer

Does My Smartphone Listen To Me?

5 Websites To Increase Your Typing Speed

Is It Good To Use Social Media?

When You Should Buy a New Smartphone? Right Time To Upgrade A Smartphone?

Why iPhone Run Smoothly With Less RAM than Android?