Open In App

What characters can be used for up/down triangle (arrow without stem) for display in HTML ?

Last Updated : 30 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will see what characters can be used for up/down triangles (arrow without stem) for display in HTML.

Unicode is a simple and quick way to add basic characters to your web page. It doesn’t require external requests and it cuts down on page load time. It doesn’t require an image to be included, which means that it can be adjusted manually.

Approach: Unicode can be used in both your HTML and CSS in two slightly different ways. So, here is the Unicode for various arrowheads:

  • ▲ – U+25B2 – Black up-pointing triangle without stem
  • ▼ – U+25BC – Black down-pointing triangle without stem
  • ▴ – U+25B4 – Small black up-pointing triangle without stem
  • ▾ – U+25BE – Small black up-pointing triangle without stem

Note: Don’t forget to add ‘;’ after the Unicode.

Example 1: This example describes the use of the Unicode that can display up/down triangles in HTML.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content=
        "width=device-width, initial-scale=1.0">
    <title>Using Unicode Characters</title>
</head>
  
<body>
    <h2>Welcome To GFG</h2>
    <p>
        You can find more 
        information below ▼
    </p>
</body>
  
</html>


Output:

 

You can also use CSS to use Unicode characters. This is done by using pseudo-elements like ::before & ::after selectors. The benefits of using Unicode in your CSS is that it can be styled independently.

Example 2: In this example, we want to display an up/down triangle after an <p> HTML element, using CSS.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content=
        "width=device-width, initial-scale=1.0">
    <title>Using Unicode Characters</title>
      
    <style>
        p::after {
            content: '\25BC';
        }
    </style>
</head>
  
<body>
    <h2>Welcome to GeeksforGeeks</h2>
      
    <a href=
        Data Structures & Algorithms
    </a>
      
    <p>
        Click the above DSA link 
        to find more information
    </p>
</body>
  
</html>


We include it by replacing ‘U +’ with ‘\’ before the Unicode.

Output:

 



Similar Reads

What are the HTML tags used to display the data in the tabular form ?
In this article, we will know the HTML tags that can be used to display the data in tabular form. A table is a representation of data in rows and columns, that helps to organize the complex structured data. Tables are widely used in communication, research, and data analysis. For instance, if we need to find the data from the set of information tha
4 min read
Which tag is used to display additional information when we click to open or close on demand in HTML ?
HTML provides many predefined tags which have some specific functionality for the contribution of developing web pages. In this article, we will learn how to show the additional information when the user clicks to open or close on demand in HTML. This can be simply done with the help of the HTML &lt;details&gt; tag in the document. This tag is used
1 min read
Can we use Hoisting with Arrow function ?
In this article we will see how does exactly Hoisting works using both normal function as well as arrow function in JavaScript. Arrow function: Arrow function introduced in ES6, provides a concise way to write functions in JavaScript. Another significant advantage it offers is the fact that it does not bind its own. In other words, the context insi
3 min read
How can I stack two arrow images (upvote/downvote) on top of eachother using CSS ?
CSS (Cascading Style Sheets) is a stylesheet language used to design a webpage to make it attractive. The reason for using this is to simplify the process of making web pages presentable. It allows you to apply styles on web pages. More importantly, it enables you to do this independent of the HTML that makes up each web page. In this article, we w
2 min read
What is the difference between display: inline and display: inline-block in CSS?
The display property in CSS is a very useful and commonly used property that contains many values. The display property defines how an HTML element should be displayed on the webpage. The property also specifies the type of box used for an HTML element and how it should be laid out on the page. If we need to display the elements that are laid out a
4 min read
How display: inline is different from display: inline-block in CSS ?
In this article, we will know about the display property in CSS, along with understanding the 2 different property values for display property, i.e., display: inline &amp; display: inline-block properties, &amp; will understand their basic differences &amp; implementation through the examples. The display property facilitates setting the element by
3 min read
What is the difference between display:inline-flex and display:flex in CSS ?
In this article, we will see the display property &amp; its values, i.e. the inline-flex &amp; flex, in order to specify the display behavior of an element, along with understanding their basic differences &amp; will illustrate them through the examples. Both CSS display: inline-flex and display: flex properties are used to create flexible layouts.
3 min read
Which property can be used to modify the content of HTML element ?
In this article, we will see the property that can be used to modify the content of HTML element. To modify the content of HTML element, we will use HTML DOM innerHTML Property. The innerHTML Property is used to set or return the content of HTML element. Syntax: It returns the content of an element. Object.innerHTML It is used to set the content of
2 min read
Which tag can be used as a container for the HTML elements ?
There are lots of tags that can be used as a container in HTML. These tags are generally divided into three parts, i.e., the opening tag, the content (which will display in the browser), and the closing tag. The content part can contain some other tags. The opening and closing tags are used in pairs. If you forget to close the container tag, the br
2 min read
Which tag can be used to control the editing for multi-line plain-text in HTML ?
In this article we will discuss the HTML tag that is used to control the editing for multi-line plain-text in HTML. The &lt;textarea&gt; tag in HTML defines a multi-line plain-text editing control. It will be created with n rows and n columns. so we can say that the size of the text area will depend upon the number of rows and the number of columns
1 min read
Article Tags :