private void ApplyToFirstChild(HtmlNode node, List<HtmlStyle> htmlStyles) { if (node.HasChildren) { HtmlNode child = node.GetChild(0); //Loop to skip empty text children while (child != null && child.Tag == HtmlTag.TEXT && child.Html.Trim() == string.Empty) { child = child.GetNext(); } if (child != null) { ApplyStyle(child, htmlStyles); } } }