简体   繁体   English

使 html 文本加粗,但不是文本旁边的 ejs 变量

[英]Make html text bold but not the ejs variable next to the text

在此处输入图像描述

How do I make the "Guest signed up" and "Guests attended" text bold (from image above) while keeping the values not bold?如何使“已注册的客人”和“已参加的客人”文本加粗(来自上图),同时保持值不加粗? Here's what I have now:这是我现在拥有的:

          <li class="list-group-item">Guests signed up: <%= guestSignups %></li>
          <li class="list-group-item">Guests attended: <%= guestAttends %></li>

I tried below and it dropped the values down one line and looked terrible.我在下面尝试过,它把值下降了一行,看起来很糟糕。

          <li class="list-group-item fw-bold">Guests signed up: 
              <p class="fw-normal"><%= guestSignups %></p>
            </li>
          <li class="list-group-item fw-bold">Guests attended: 
            <p class="fw-normal"><%= guestAttends %></p>
            </li>

you can wrap the string around ab or strong tag您可以将字符串包裹在 ab 或 strong 标签周围

or even a <span class="specialBoldFontClass"> with a custom class甚至是带有自定义 class 的<span class="specialBoldFontClass">

 <li class="list-group-item"><b>Guests signed up:</b> <%= guestSignups %></li> <li class="list-group-item"><b>Guests attended:</b> <%= guestAttends %></li>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM