Changing the font based on language - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Font

Description

Changing the font based on language

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
p[lang=en]<!--from w  w w  . j a  v a  2 s .c o m-->
 {
   font-family:"Comic Sans MS";
}

p[lang=es]
 {
   font-family:Arial;
}
</style> 
 </head> 
 <body> 
  <p lang="en">Lorem ipsum dolor sit ame</p> 
  <p lang="es">Lorem ipsum dolor sit amet, co</p>  
 </body>
</html>

Related Tutorials