What are some common methods for formatting text in PHP for email generation?

When generating emails in PHP, it is common to format text using HTML markup to create visually appealing and structured content. Some common methods for formatting text in PHP for email generation include using HTML tags such as <p> for paragraphs, <strong> for bold text, <em> for italic text, <ul> and <li> for unordered lists, and <a> for hyperlinks.

$message = &quot;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Email Content&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;This is a paragraph of text.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is bold text.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This is italic text.&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Item 1&lt;/li&gt;
&lt;li&gt;Item 2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Visit our website &lt;a href=&#039;http://www.example.com&#039;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
&quot;;

$headers = &quot;MIME-Version: 1.0&quot; . &quot;\r\n&quot;;
$headers .= &quot;Content-type:text/html;charset=UTF-8&quot; . &quot;\r\n&quot;;

mail($to, $subject, $message, $headers);