1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Disable bold in a part of a sentence

Discussion in 'HTML & Website Design' started by dabidovic123, Nov 6, 2022.

  1. #1
    Hi,

    ?>
                    <p><h2><?php esc_attr_e( 'Print Invoice:', 'woo-invoice' ); ?> <a href="<?php echo esc_url_raw( $url ); ?>" target="_blank"><?php esc_attr_e( 'Open print view in browser', 'woo-invoice' ); ?></a></p>
                <?php endif;
    HTML:
    The output of the code above is :

    Print Invoice: Open print view in browser

    This whole sentence is bold because "Print Invoice" is in h2.

    I want the "Open print view in browser" link not to be in BOLD.
    Please, how do I fix the code to do this?

    Thank you,
     
    dabidovic123, Nov 6, 2022 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #2
    Your h2 tag doesn't have a closing tag </h2>

    Try this:

    <p><h2><?php esc_attr_e( 'Print Invoice:', 'woo-invoice' ); ?></h2> <a href="<?php echo esc_url_raw( $url ); ?>" target="_blank"><?php esc_attr_e( 'Open print view in browser', 'woo-invoice' ); ?></a></p>
                <?php endif;
    Code (markup):
    Now it will cancel the h2 and the bold.
     
    qwikad.com, Nov 6, 2022 IP
    seomanualsubmission likes this.
  3. dabidovic123

    dabidovic123 Greenhorn

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Thanks qwikad.com for your reply.

     
    dabidovic123, Nov 7, 2022 IP