0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

vscodeのエメットでclass名とid名を同時に指定して出す

0
Last updated at Posted at 2026-01-29

vscodeのHTMLでbutton属性にclassとidを今まですべて手打ちしていたが、さすがにめんどくさすぎるのでエメットを使おうと今更決心した。

今回の場合buttonの後ろにclass=modal-colse, id=modalCloseというボタンをエメットで一発で出したい。


classのエメットやり方

.class名

idのエメットやり方

#id名

以上を踏まえて以下を入力。

button.modal-close#modalClose

これ打ってenter押せば

<button class="modal-close" id="modalClose"></button>

が一発で出てくる。


エメットで快適開発ライフを送りたい。


参考記事
【よく使うEmmetまとめ】HTMLやCSSを素早く書こう!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?