To assign a value to an HTML attribute on an Odoo website, you can use either the template editor or the developer mode.
In the template editor:
- Go to your Odoo website and click on the Edit button on the top right corner.
- Select the page or block where you want to add the HTML attribute.
- Click on the Edit button again to enter the template editor.
- Locate the HTML element where you want to add the attribute and click on it.
- Add the attribute and its value within the element's tag, like this: <element attribute="value"></element>
- Save and publish your changes.
In the developer mode:
- Go to your Odoo website and activate the developer mode by adding "/web#debug" at the end of its URL.
- Click on the Edit button to enter the Edit mode.
- Right-click on the HTML element where you want to add the attribute and select "Inspect Element" from the drop-down menu.
- In the inspect panel, locate the HTML element and add the attribute and its value within the element's tag.
- Exit the inspect panel and click on the Save button to apply your changes.
- Exit the developer mode and publish your changes.