title: Change Font Family and Font Size using HtmlAgilitPack
body: <p>I need  to change <strong>font family</strong> and <strong>font size</strong> of the given HTML to a specific font family and size. (Ex: Times New Romen, size: 12) Do you know how it could be done using HtmlAgilityPack?</p>
  
  <p>Font size can be defined in many ways in the given html. Ex: using <code>&lt;Font Size="" tag, &lt;H3&gt;</code>, also Style tag. Therefore I need to change all to a specific font size.</p>
  
  <p>Following is a Sample HTML Code:</p>
  
  <pre><code>    &lt;html&gt;&lt;H3 style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="mso-bidi-font-family: &amp;#39;Tw Cen MT Condensed Extra Bold&amp;#39;; mso-fareast-font-family: &amp;#39;Tw Cen MT Condensed Extra Bold&amp;#39;"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size="5" face="Tw Cen MT Condensed Extra Bold"&gt;1.1.1&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt &amp;#39;Times New Roman&amp;#39;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size="5" face="Tw Cen MT Condensed Extra Bold"&gt;Sample text1: The following code iterates through all the items in the ListBox and addsPictureBoxes dynamically to a FlowLayoutPanel using the image sources retrieved in the previous step.&lt;/FONT&gt;&lt;/H3&gt;
  &lt;P style="MARGIN: 0in 0in 0pt" class="MsoNormal"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?&gt;&lt;/P&gt;
  &lt;H3 style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="mso-bidi-font-family: &amp;#39;Tw Cen MT Condensed Extra Bold&amp;#39;; mso-fareast-font-family: &amp;#39;Tw Cen MT Condensed Extra Bold&amp;#39;"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size="5" face="Tw Cen MT Condensed Extra Bold"&gt;1.1.2&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt &amp;#39;Times New Roman&amp;#39;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size="5" face="Tw Cen MT Condensed Extra Bold"&gt;Sample text 2: The following code iterates through all the items in the ListBox and addsPictureBoxes dynamically to a FlowLayoutPanel using the image sources retrieved in the previous step.&lt;/FONT&gt;&lt;/H3&gt;
  &lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2; tab-stops: list .5in" class="MsoNormal"&gt;&lt;SPAN style="FONT-FAMILY: &amp;#39;Bauhaus 93&amp;#39;; FONT-SIZE: 20pt; mso-bidi-font-family: &amp;#39;Bauhaus 93&amp;#39;; mso-fareast-font-family: &amp;#39;Bauhaus 93&amp;#39;"&gt;&lt;SPAN style="mso-list: Ignore"&gt;a.&lt;SPAN style="FONT: 7pt &amp;#39;Times New Roman&amp;#39;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: &amp;#39;Bauhaus 93&amp;#39;; FONT-SIZE: 20pt"&gt;Sample text 3: The following code iterates through all the items in the ListBox and addsPictureBoxes dynamically to a FlowLayoutPanel using the image sources retrieved in the previous step.&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P style="MARGIN: 0in 0in 0pt 0.25in" class="MsoNormal"&gt;&lt;SPAN style="FONT-FAMILY: &amp;#39;Bauhaus 93&amp;#39;; FONT-SIZE: 20pt"&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P style="MARGIN: 0in 0in 0pt 0.5in" class="MsoNormal"&gt;&lt;SPAN style="FONT-FAMILY: &amp;#39;Bradley Hand ITC&amp;#39;; FONT-SIZE: 18pt"&gt;Sample Text 4: The following code iterates through all the items in the ListBox and addsPictureBoxes dynamically to a FlowLayoutPanel using the image sources retrieved in the previous step.&lt;/SPAN&gt;&lt;/P&gt;&lt;/html&gt;
  </code></pre>