- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to do bold and simple text in the same line using the echo in php?
In order to get bold text, you need to use font-weight and to get the simple text you can use <span> tag. All this gets added in the echo.
The PHP code is as follows
<!DOCTYPE html> <html> <body> <?php echo '<span style="font-size: 20px; color: #006400; font-weight: bold;">This is my first PHP Program</span> '.$row['data']; ?> </body> </html>
Here is the snapshot of sample output.
This is my first PHP Program
- How do we add bold text in HTML?
- How to make text bold, italic and underline using jQuery
- How to make text bold in HTML?
- echo() function in PHP
- How to echo XML file in PHP
- How to display a bold text inside the JTextArea in Java?
- How to make a text bold and italic in JavaFX?
- What is the difference between echo, print, and print_r in PHP?
- How to add bold annotated text in Matplotlib?
- How to read only 5 last line of the text file in PHP?
- How to use Bold & Non-Bold Text In A Single UILabel in iOS/iPhone?
- How to make a specific text on TextView bold in Android using Kotlin?
- In PHP, can you instantiate an object and call a method on the same line?
- How to adjust the line spacing in the text node in JavaFX?