---
title: "Discussion on \"What are div::before and div::after? How do we use them ?\" | Hashnode"
description: "Discussion on \"What are div::before and div::after? How do we use them ?\". Do you still have questions about the pseudo-elements div::before and div::after? If so, don't worry; I didn't understand it either when I was learning CSS or when I saw coding tweets where many developers showed tutorials on how to make this and tha..."
url: "https://hashnode.com/posts/what-are-divbefore-and-divafter-how-do-we-use-them/6324a11abc15ea8efdf5dfbe"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What are div::before and div::after? How do we use them ?](https://dir-blogs.hashnode.dev/what-are-divbefore-and-divafter-how-do-we-use-them?utm_source=hashnode&utm_medium=feed)

Do you still have questions about the pseudo-elements div::before and div::after? If so, don't worry; I didn't understand it either when I was learning CSS or when I saw coding tweets where many developers showed tutorials on how to make this and tha...

Sep 16, 2022 · 4 min read · dir-blogs.hashnode.dev  
Read the article

-   [#2articles1week](https://hashnode.com/tag/2articles1week)
-   [#2articles1week-1](https://hashnode.com/tag/2articles1week-1)
-   [#week1](https://hashnode.com/tag/week1)
-   [#html](https://hashnode.com/tag/html)
-   [#css](https://hashnode.com/tag/css)

## Written by

[Dita Izaty](https://hashnode.com/@dita-izaty)

@dita-izaty · Indonesia

  
[View profile](https://hashnode.com/@dita-izaty)

I enjoy learning new things every day ~

I am interested in information technology, psychology and whatever it is related to the digital tech. I like to surf the internet to find out what I understand and learn it and try new things every day from the internet about my interests.

## Responses 1

Markdown supported · ⌘↵ to post

[Oye Ibrahim](https://hashnode.com/@Oye)

[Sep 16, 2022](https://hashnode.com/posts/what-are-divbefore-and-divafter-how-do-we-use-them/6324a11abc15ea8efdf5dfbe/comment/6324ce70dd55cd8b89b1d661)

Interesting read, thanks for sharing. So from what I understand here is that the ::before add content before the text within the div while ::after add content after the text . eg

<div> ::before Hello! ::after </div>

[Dita Izaty](https://hashnode.com/@dita-izaty)

[Sep 17, 2022](https://hashnode.com/posts/what-are-divbefore-and-divafter-how-do-we-use-them/6324a11abc15ea8efdf5dfbe/comment/6324ce70dd55cd8b89b1d661#reply-63251853bc15ea8efdf5ebea)

Yes, that's correct; thank you for reading, Oye.. I'm glad if that was useful
