Floating labels

How can floating labels be created?
I tried to do it with custom code and the desired effect is not achieved

<div class="form-floating mb-3">
  <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
  <label for="floatingInput">Email address</label>
<div class="form-floating">
  <input type="password" class="form-control" id="floatingPassword" placeholder="Password">
  <label for="floatingPassword">Password</label>

That works fine.

Have you got your document set for bs5?

Thank you richards for your reply.

I found the problem. I made a theme with https://bootstrap.build/app and that’s why it didn’t work