Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- Is It Okay to Use CSS and HTML in the Same Statement?


SteveWh - 7:15 am on Jul 14, 2012 (gmt 0)


It is ok to use both, but it is considered best to push as much of the formatting as possible into CSS, and the <font> tag is one that people say to avoid. In your example, you can do all the styling with CSS:

<h1 style="text-align:center; font-family:arial,sans-serif; font-size:large;">Text Here</h1>

I hope I got that mostly right. There are various ways to specify font size. I chose one that might not be the exact equivalent of size=5.

Alternatively, you can put a separate style declaration in your page, or even in a separate .css file, which makes it much easier to make site-wide changes. This would style all h1 tags:

h1
{
text-align:center;
font-family:arial,sans-serif;
font-size:large;
}


Thread source:: http://www.webmasterworld.com/html/4475562.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com