Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

PHPStormでEmmet

More than 3 years have passed since last update.

書式

親タグ>(兄弟タグ1#ID.クラス[属性名=属性値]{テキスト}+兄弟タグ2+...)*繰り返し数

1個の "\$" は連番、n個の "\$" は前ゼロ付きn桁固定長の連番。

PHPStormのエディタで以下のように入力する。

table#q_tbl>(tr#q$$>((td.number1>span)+(td.op>span)+(td.number2>span)+(td.answer>input[type=text][name=answer$$][value=])+(td>button{解答})+(td.result>span)))*2

入力の末尾にカーソルがある状態でTabを押すと以下のようなHTMLに変換される。

<table id="q_tbl">
  <tr id="q01">
    <td class="number1"><span></span></td>
    <td class="op"><span></span></td>
    <td class="number2"><span></span></td>
    <td class="answer"><input type="text" name="answer01" value=""></td>
    <td>
      <button>解答</button>
    </td>
    <td class="result"><span></span></td>
  </tr>
  <tr id="q02">
    <td class="number1"><span></span></td>
    <td class="op"><span></span></td>
    <td class="number2"><span></span></td>
    <td class="answer"><input type="text" name="answer02" value=""></td>
    <td>
      <button>解答</button>
    </td>
    <td class="result"><span></span></td>
  </tr>
</table>
y_ito
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away