I am using hs-minor-mode and fold-dwim mode.
I added below regex to match html tags by setting the variable hs-special-modes-alist:
(html-mode "<\([A-Za-z][A-Za-z0-9]*\)[^>]*>.*?" "</\1>" "-->" nil nil)
;; Format: (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC)
But there is no effect when I use it (using command fold-dwim-toggle.) inside html file.
Here is the relevant section in my .emacs file:
;; hideshow
(setq hs-special-modes-alist
(mapcar 'purecopy
'((c-mode "{" "}" "/[*/]" nil nil)
(c++-mode "{" "}" "/[*/]" nil nil)
(bibtex-mode ("@\\S(*\\(\\s(\\)" 1))
(java-mode "{" "}" "/[*/]" nil nil)
(js-mode "{" "}" "/[*/]" nil)
;; (html-mode "<!-- {{{ " "<!-- }}} -->" " -->" nil t)
(html-mode "<\([A-Za-z][A-Za-z0-9]*\)[^>]*>.*?" "</\1>" "-->" nil nil) ;gw: self edited, see blw ref:
;; http://www.regular-expressions.info/examples.html
)))