Ankur Saraswat
Ankur Saraswat

Reputation: 5

How to make first line colored and bold in PHP?

I am a novice.

<?php echo $order['store_address']; ?>

This results in address including name of person and address on next line. I want to make persons name bold but failed to use first-line pseudo element. How can i make it bold.

Upvotes: 0

Views: 143

Answers (2)

Nehal
Nehal

Reputation: 1523

You can use the pseudo element ::first-line.

OR

Also you can place your php in HTML tags(such as div, p, span, heading, etc.) and style it using css.

For Example,

<h1 class="new-text"><?php echo $order['store_address']; ?></h1>

<style>
.new-text{
  color:blue;
  //... and so on
}

Upvotes: 0

Lo&#239;cR
Lo&#239;cR

Reputation: 5039

Why not use the pseudo element ::first-line ? It's exactly what you want

Upvotes: 2

Related Questions