XHTML is a bit more strict in its implementation, and for good reason: its usefulness extends beyond its ability to be manipulated by humans. It is made to be more predictable, so that the outcome has less variance across different platforms and through difference circumstances.
First, by strictness, I simply mean that for both HTML5 and XHTML, you must follow certain guidelines for your code. For XHTML, these guidelines are more rigid, as an intent behind XHTML is for it to be usable by both computers and humans.
HTML5 will let you get away with more 'errors', so to speak, by accepting code despite improper usage of the language. XHTML will not allow you to get away with nearly so much as HTML5 will.
Since computers have difficulty interpreting anything that is not extraordinarily explicit in its outline, they usually require that you provide them with information very clearly, and according to the manner in which they expect to receive it.
A good question, then, would be: 'isn't the computer interpreting HTML5, too? And if so, why doesn't it require these stricter guidelines as it does for XHTML?'
The answer is that, yes, a computer (the browser on the visiting machine, or the server serving the data) is interpreting it, but browsers are made to be more lax; they will assume things when you provide them with 'erroneous' code. It's really not a big deal if you fail to load a reddit thread due to some unforeseen consequence of poorly managed code. You can often still run into unpredictable results due to these discrepancies, but it's simply not as frightening a consequence as it used to be.
However, if you have a more sensitive web application, and wish for it to be highly standardized and interpretable by any browser, or, say, you have a page that requires that the information be reliable (as an example, say that lives could potentially depend on this information being accurate to a fault), then you can't afford to make any such assumptions. Therefore, XHTML would be preferred for those implementations. It will not allow you to be so lax, and as a consequence, you will have to write stricter code to ensure that another computer (not always a browser!) that utilizes this information will be able to understand it in nearly all cases. Of course, for those cases in which something does break down somewhere along the chain, there will also be fail-safes built-in to handle them (often requiring the attention of a nearby human!), but nevertheless, this is an important difference between XHTML and HTML5, and a reason one might consider using XHTML over HTML5.
This is just one interpretation; mine. Really, so far as I understand it, the biggest singular difference is that XHTML can be read by XML parsers, while HTML5 may or may not be able to be read by those same parsers. That is the practical difference in a few words.
I'm not sure if this was helpful or not, nor if it is accurate to the level I would prefer it be, but I gave it a shot. Anyone with corrections or additional comments to make, please chime in! It wasn't until recently that I picked up web development, so my coding background is not anywhere close to centered around it.
You might risk asking your teacher why she or he insists upon XHTML, but it is likely due to the curriculum and how your code will be evaluated. That's my guess.
Edited by UKHInside, 16 March 2016 - 09:26 PM.