What is the best practice for including PHP forms within a specific div area on a webpage?

When including PHP forms within a specific div area on a webpage, it is best practice to use HTML and PHP to structure the form within the desired div. This can be achieved by opening the div tag before the form and closing it after the form. This ensures that the form is contained within the specified div area on the webpage.

<div>
  <form method="post" action="process_form.php">
    <!-- Form fields go here -->
    <input type="text" name="username" placeholder="Username">
    <input type="password" name="password" placeholder="Password">
    <button type="submit">Submit</button>
  </form>
</div>