Yes that’s fine. There are some things not possible or practical in markdown so write them as html in a .md file
E.g.
## Heading
<div align="center">
<img src="..." height="100" />
</div>
- bullet
- list
- in
- markdown
The html above sets the size and alignment for an image which work in jekyll between the markdown above and below. I would normally use CSS but the example is actually what I put in a Github README.md file where CSS doesn’t work.
Another example is where you need to build up a bullet list or table using html and a for loop. And if you did it in markdown it would be less readable and you’d have to dedent everything to avoid it becoming code. Plus some empty lines would become markdown and mess with your structure when html tags which don’t care about white space lines work better
Another case is where I want to add a class or ID to an item in a markdown file.