Home > front end >  adding classes to HTML
adding classes to HTML

Time:12-20

in some where of my html coding that is wanted to add another attribute beside of the ex-one

{The bottom borders under your % Daily Value * and Saturated Fat 1g 5% elements do not extend the full width of the label. Add no-divider to the class for these two elements. Your p element with the text Saturated Fat 1g 5% should have no-divider added to the class attribute. Do not remove the existing classes.}

<div >
        <p   >% Daily Value *</p>
        <div ></div>
        <p><span >Total Fat</span> 8g<span >10%</span></p>
        <p >Saturated Fat 1g <span >5%</span></p>
      </div>

\

CodePudding user response:

To add the no-divider class to the p element with the text "Saturated Fat 1g 5%", you can modify the HTML code as follows:

<div >
        <p   >% Daily Value *</p>
        <div ></div>
        <p><span >Total Fat</span> 8g<span >10%</span></p>
        <p >Saturated Fat 1g <span >5%</span></p>
      </div>

The no-divider class should be added to the class attribute of the p element, separated by a space from the existing indent class. This will add the no-divider class to the element, allowing you to apply the desired styling to it.

CodePudding user response:

Your question is not clear You ask the question with the output again. And if possible show what you want to create by drawing it in the output or creating a ui.

  • Related