How do I over-ride the default background color using CSS

I have an app that I have had help with and now I’m trying to tweak it a little. I want to change my background color on a form when a record is being edited and a different background color when a new record is being added.
I tried calling the color class with this:

<div class body = background-color:bg-lightyellow>

It doesn’t work and I’m pretty sure it gets overwritten. Admittedly, I am a newbie to Django, but I am persistent. I would appreciate someone pointing me in the right direction!

Here is the form code:
{% extends ‘theme/default.html’ %}
{% block title %}{{ client.get_display_name }}{% endblock title %}

{% block content %}

{{client.get_display_name }} #{{ }}

<div class body = background-color:bg-lightyellow>

{% include "clients/partials/client_form.html" %}
{% endblock content %}

This is the CSS code:

.table {
–bs-table-striped-bg: rgb(232, 250, 224);

.bg-lightyellow {
background-color: rgb(250, 250, 155);

This is not how you apply syles to an element. Using CSS isn’t like writing code in a programming language, it’s a set of attributes being applied to one or more elements within the HTML document.

Getting into all the details about how to use CSS with HTML elements is too much for a forum post. I suggest you find an appropriate tutorial that covers this material. A search for “CSS Tutorial” should bring up a bunch of options. (e.g. Getting started with CSS - Learn web development | MDN)

I’m familiar with CSS and how it works. What I’m not familiar with is how to call it from this particular page with the includes of base.html and other elements.

You don’t “call” things. You apply attributes to the elements.

You identify the element that you want to change, and either add a style attribute on that element, or a class attribute on it that refers to an element defined in a .css file.