How to apply custom css on img tag

Hello all,

Currently, I’m using hugo material theme : https://github.com/digitalcraftsman/hugo-material-docs

When I write the following content markdown

![practice-signup-1](/images/practice-signup-1.png)

Hugo will generate the following HTML code

<p><img src="https://investing.jstock.co/images/practice-signup-1.png" alt="practice-signup-1"></p>

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

<p><img src="https://investing.jstock.co/images/practice-signup-1.png" 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