You might be able to do this if you are looking to create a native app like this post discusses: Phone Rotation Lock
In the browser, maybe try something like this: https://css-tricks.com/snippets/css/orientation-lock/ or you can try something like this: https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation just change it to portrait instead of landscape maybe. 
Hope that helps! 
For All Your No-Code Education Needs:
- One-on-One Tutoring
- eLearning Hub
- Video Tutorials
- No-Code Classes