I think these settings should do the trick:
(defun my-html-mode-hook ()
(setq tab-width 4)
(setq indent-tabs-mode t)
(define-key html-mode-map (kbd "<tab>") 'my-insert-tab)
(define-key html-mode-map (kbd "C->") 'sgml-close-tag))
(defun my-insert-tab (&optional arg)
(interactive "P")
(insert-tab arg))
(add-hook 'html-mode-hook 'my-html-mode-hook)
An explanation of the settings in is 'my-html-mode-hookas follows:
- set bookmark width to 4
- Insert force tabs (as opposed to spaces)
TAB, ( ,'sgml-close-tag - , close , .
, , TAB TAB, . , 'self-insert-command ( ).
'html-mode-hook. ( html-), , 'eval-after-load. .