These tests are just to play with some folding ideas to see how different things can be done.
:map <F5> ggVGy<C-w><C-w>:@"<CR>
syn clear syn case ignore syn region html start=/<\z\(html\)>/ end=/<\/\z1.*>/ contains=ALL fold syn region head start=/<\z\(head\)>/ end=/<\/\z1.*>/ contains=ALLBUT,html,body fold syn region body start=/<\z\(body\)\s*.*>/ end=/<\/\z1.*>/ contains=ALLBUT,html,head,body fold syn region element start=/<\z\(style\|script\|form\|table\|ul\|ol\|div\).*>/ end=/<\/\z1.*>/ contains=ALLBUT,html,head,body fold syn region comment start=/<!--/ end=/-->/ contains=ALLBUT,comment set fen set foldnestmax=20 set foldlevel=0 set foldmethod=syntax syn sync fromstart