title: html indentation for css, html in emacs
body: <p>I have problem with emacs indentation in html and js mode .
  i want better mode or function for better indention</p>
  
  <p>I also see <a href="http://www.emacswiki.org/emacs/SmartTabs" rel="nofollow">Smart Tab</a> and create code like this </p>
  
  <pre><code>(require 'smarttabs)
  (define-key read-expression-map [tab] 'hippie-expand)
  (define-key read-expression-map [backtab] 'unexpand)
  
  (smart-tabs-advice js2-indent-line js2-basic-offset)
      (smart-tabs-advice python-indent-line-1 python-indent)
      (add-hook 'python-mode-hook
                (lambda ()
                  (setq indent-tabs-mode t)
                  (setq tab-width (default-value 'tab-width))))
  (smart-tabs-advice html-indent-line html-basic-offset)
  </code></pre>
  
  <p>but there is problem too, in js2mode, html-mode, nxhtml mode i have many problem like this</p>
  
  <pre><code>&lt;div&gt;
    &lt;table&gt;
      &lt;tr&gt;
        &lt;td&gt;
          test
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <ul>
  <li>its all space and i want tab ( with
  specific size )</li>
  <li>sometimes i want use <code>tab</code> and <code>shift tab</code> for more tab or less but doesn't work ... only this indentation is acceptable :D </li>
  </ul>
  
  <p>or for javascript js2mode create somethings like this</p>
  
  <pre><code>function preview(img, selection) {
      var scaleX = 64 / (selection.width || 1);
      var scaleY = 64 / (selection.height || 1);
      $('#preview').css({ 
                            width: Math.round(scaleX * img.width) + 'px',
                            height: Math.round(scaleY * img.height) + 'px',
                            marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
                            marginTop: '-' + Math.round(scaleY * selection.y1) + 'px' 
                        });
  }
  </code></pre>
  
  <p>but i want this</p>
  
  <pre><code>function preview(img, selection) {
      var scaleX = 64 / (selection.width || 1);
      var scaleY = 64 / (selection.height || 1);
      $('#preview').css({
          width: Math.round(scaleX * img.width) + 'px',
          height: Math.round(scaleY * img.height) + 'px',
          marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
          marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
      });
  }
  </code></pre>
  
  <p>what i can do for this problem?</p>