If condition inside <div> style attribute

Hi there,
I’d like to create a simple conditional statement for the background-image inside my

.
I tried something like this, but it doesn’t work. Is it possible to use a condition like below ?
Thanks for your help.

<div style="background-image:url('<If image_url exists>{Field image_url}<Else>http://image.jpeg</If>');
  background-size:cover;" 

Hello - I see this is about using L&L tags inside a style attribute. This is supported by the use of curly brackets {} instead of angle brackets <> used normally. It’s documented here:

Your example would look like:

<div style="background-image:url('{If image_url exists}{Field image_url}{Else}http://image.jpeg{/If}');">

This syntax is meant for short snippets of template. For longer expressions, it’s recommended to store it in a variable first, then pass it to the attribute.

<Set name=background-image-url>
  <If image_url exists><Field image_url><Else>http://image.jpeg</If>
</Set>

<div style="background-image: url('{Get name=background-image-url}');">