HTML/font face

Advertisement


Question
QUESTION: I know in HTML I would set Font Face like this

<font face="arial">
Then I type text here.
</font>

But in Inline CSS can I do this

<p style="color:white; font-family:arial;">
Then I type my text here.
</p>

Is this right?

ANSWER: Dear Bob,

Yes, you are correct nothing wrong in that.

Regards,
Anjana

---------- FOLLOW-UP ----------

QUESTION: Thank you for getting back to me.

Now just one more thing about Fonts?

If I want to make my Text have a Font of Arial but if the persons Browser can not display that Font I would like my backup Font to be Times New Roman so can I do this?

<p style="color:white; font-family:arial; :times new roman;">
Then I type my text here.
</p>

or do I have it wrong

Answer
Dear Bob,

In this case use font-family as you have already used. Give set of fonts you would like the browser to render starting from the highest priority to least priority.

font-family:Arial,"Times New Roman",anytext1,anytext2,......;

Note: If a font name contains white-space, it must be quoted. Single quotes must be used when using the "style" attribute in HTML.

Go to this link for more hints on this,
http://www.w3schools.com/cssref/pr_font_font-family.asp

Regards,
Anjana

HTML

All Answers


Answers by Expert:


Ask Experts

Volunteer


Anjana Silva

Expertise

I can answer most of HTML related questions. Also I can combine HTML with CSS, JavaScript, AJAX, PHP, etc.. Also if you need to combine these technologies with an IDE like Dreamweaver, it's my pleasure!

Experience

I'm in HTML field (Web Development & Design) for more than 7 years. I've developed lots of web sites using HTML/CSS/PHP/MySQL.

Organizations
1) e-Innoving IT Solutions - Owner/Developer
2) OpenArc Business Process Outsourcing - PHP Web Developer
3) Stan Bond (SA) PTY LTD - Web Application Developer


Publications

Few sites that I have done using Dreamweaver.

1) http://www.legendmaldives.com
2) http://e-innoving.com/index.php/portfolio
3) http://www.vacationmaldives.com
4) http://www.stanbondsa.com.au
5) http://www.adelaidequalityblinds.com.au/
6) http://www.sybilwettasinghe.com
7) http://www.novels.lk


Education/Credentials
1) Currently following MSc in Software Engineering in De Montfort University, Leicester
2) Bachelor in Information Technology (UCSC)
3) Sun Certified Java Professional (SCJP)
4) Diploma in Advanced Web Techniques using Dreamweaver.


Awards and Honors
2nd Class Upper Award for my Bachelors Degree with an average GPA of 3.48

©2016 About.com. All rights reserved.