Javascript 哪个是使用区段标签的好概念?

Javascript 哪个是使用区段标签的好概念?,javascript,php,html,Javascript,Php,Html,我想在我的程序中使用节标记,所以在程序内部使用节标记的正确方法是 <section id="training-pg"> <div class="row"> <div class="container"> // Write you code here. <h3>the title</h3> <p><?php the_field('training

我想在我的程序中使用节标记,所以在程序内部使用节标记的正确方法是

<section id="training-pg">
     <div class="row">
       <div class="container">
        // Write you code here.
         <h3>the title</h3>
         <p><?php the_field('training_program'); ?></p>
       </div>
      </div>
    </section>      //  Or 

    <div class="container-fluid">
      <div class="row">
        <section id="training-pg">
          <h3>the title</h3>
          <p><?php the_field('training_program'); ?></p>
        </section>
      </div>
    </div>

//在这里编写代码。
标题

//或 标题


第一种方法是使用节标记的正确方法

<section id="training-pg">
 <div class="row">
   <div class="container">
    // Write you code here.
     <h3>the title</h3>
     <p><?php the_field('training_program'); ?></p>
   </div>
  </div>
</section> 

//在这里编写代码。
标题


根据,使用
的语义方式是:

节是内容的主题分组,通常带有标题

根据:

HTML
元素
表示HTML文档中包含的一个独立部分,它没有更具体的语义元素来表示它。通常,但并非总是,节有一个标题

鉴于您的第一个示例有一个带有ID的节,该ID清楚地定义了该节的目的以及标题,我想说:

<section id="training-pg">
    <div class="row">
        <div class="container">
            <h3>the title</h3>
            <p><?php the_field('training_program'); ?></p>
        </div>
    </div>
</section>   

标题


是使用

的正确且最具语义的方法第一种方法是使用节标记的正确方法