Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write ::before / ::after inside anchor tag

Tags:

html

css

How to write ::before inside anchor tag like this.

enter image description here

like image 376
Karthik N Avatar asked Oct 28 '25 04:10

Karthik N


1 Answers

What you see here is a CSS pseudo-element.

::before pseudo-element can be used to insert some content before the content of an element. eg - the following code will insert This comes before... before every paragraph.

p::before {
  content: "This comes before...";
}
<p>This is a paragraph</p>
<p>This is another paragraph</p>

For more information on CSS pseudo-elements, refer to this link.

like image 108
Divyanshu Maithani Avatar answered Oct 29 '25 19:10

Divyanshu Maithani



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!