If you use evil-mode, you can install https://github.com/redguardtoo/evil-matchit and press `%` If you prefer original Emacs, (autoload 'sgml-skip-tag-backward "sgml-mode" nil t) (autoload 'sgml-skip-tag-forward "sgml-mode" nil t) (defun html-jump-forward(&optional num) "Jump forward from html open tag" (interactive "P") (unless num (setq num 1)) ;; web-mode-forward-sexp is assigned to forward-sexp-function ;; it's buggy in web-mode v11, here is the workaround (let ((backup-forward-sexp-function forward-sexp-function)) (sgml-skip-tag-forward num))) (defun html-jump-backward(&optional num) "Jump forward from html close tag" (interactive "P") (unless num (setq num 1)) (let ((backup-forward-sexp-function forward-sexp-function)) (sgml-skip-tag-backward num))) It works in any html related major mode (php-mode, xml-mode, web-mode, nxml-mode ....)