Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add > (greater than) sign to the end of the links with CSS

Tags:

html

css

Is there a way to add > to the end of all hrefs using CSS?

like image 446
Roman Goyenko Avatar asked Jan 18 '26 04:01

Roman Goyenko


1 Answers

You can use the :after selector and the content property:

a:after {
    content: ">";
}

Note that pseudo-elements created this way are not part of the DOM and therefore you can't get a reference to them in JavaScript.

like image 128
James Allardice Avatar answered Jan 19 '26 18:01

James Allardice



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!