When creating my own web pages, I also prefer to implement them by overriding the CreateChildControls () and Render () methods. In the Render () method, I have complete control over the html output, and I can display my internal controls by calling this.someInnerControl.RenderControl (writer) .
Full control over html output also simplifies html style with CSS. As other people suggest, use an external CSS file and apply styles to the class attribute on the html elements or CssClass property in ASP.NET web control.
When I implement websites that do not require special branding, I prefer to reuse the CSS classes defined by SharePoint. This ensures that my website visually resembles the web page provided by SharePoint and that I maintain a consistent look.
When using the CSS styles defined by SharePoint, you should be aware of your html output. Some CSS classes require a special html structure for proper rendering. You can always use Source View browsers to check the html of the SharePoint element that you are trying to simulate.
source share