How to apply custom css on img tag

Hello all,

Currently, I’m using hugo material theme :

When I write the following content markdown


Hugo will generate the following HTML code

<p><img src="" alt="practice-signup-1"></p>

However, I wish to add the following style to my img tag

<p><img src="" alt="practice-signup-1" style="max-width: 100%; width: 50%; height: auto;"></p>

I was wondering, how can I achieve so?

Thank you.

In HTML5 is a popular tag (instead of ol’ plain image) and it has great support in Hugo! I wrote this little guide I think might help you