lilypond-book is the way to go if you want to integrate
music examples in your (static) HTML pages.
However, if you have any intention to make it possible for
students to have LilyPond installed on your web server with
some interface that lets students write their own small scores
and process them
I think it'll be very interesting to
use lilypond with e-learning environment like Caroline (http://www.claroline.net/) for Music
theory learning (and Lilypond syntax learning). Math's teachers use Mimetex
(http://www.forkosh.com/mimetex.html)
to insert image of math _expression_ into Clarol