This question is related to: https://apple.stackexchange.com/questions/51816/quicklook-html-plugin.
Here is a solution that works (tested on Mac OS X 10.7.5):
/install qlcolorcode (or qlstephen)
Edit
/System/Library/Quicklook/Web.qlgenerator/Contents/Info.plist
and comment the two lines as below:<key>LSItemContentTypes</key> <array> <string>com.apple.webarchive</string> <!-- <string>public.html</string> --> <!-- <string>public.xhtml</string> --> <string>public.svg-image</string> </array>
Add the two lines removed above under the same
<key>LSItemContentTypes</key>
into~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist
(or~/Library/QuickLook/QLStephen.qlgenerator/Contents/Info.plist
)Press Command+Option+Esc and restart Finder.
Now QuickLook should display the source code of HTML files (with syntax highlighting if you use qlcolorcode) instead of rendering them.