Academic Tutorials



English | French | Portugese | German | Italian
Home Advertise Payments Recommended Websites Interview Questions FAQs
News Source Codes E-Books Downloads Jobs Web Hosting
Chats

CSS 2.0
CSS 2.0 Introduction
CSS 2.0 Attaching Style
CSS 2.0 Applying Style
CSS 2.0 Key Concepts
CSS 2.0 Color Contents
CSS 2.0 Fonts Contents
CSS 2.0 Text
CSS 2.0 Lists
CSS 2.0 the box model
CSS 2.0 Advanced concepts
CSS 2.0 Positioning
CSS 2.0 Boxes
CSS 2.0 Generated content
CSS 2.0 Dynamic effects
CSS 2.0 Tables
CSS 2.0 Paged media
CSS 2.0 Font Face
CSS 2.0 Aural Style Sheets
CSS 2.0 Language styles

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting
Network Sites


CSS 2.0 Properties - Language styles


Previoushome






CSS2 Properties - Language styles

A D V E R T I S E M E N T



Language selectors

CSS-2 provides two selectors for selecting elements according to their language:

Language is of specified family

P[lang|="en"] matches <P lang="en-us"> as well as "en" or "en-*".

:lang(x) selector

This pseudo-class matches an element in human language x - e.g., P:lang(en) matches <P lang="en"> (English), and a document with a Content-Language HTTP header of pt is matched by :lang(pt). Note that it is matched in the same way as above in that :lang(en) matches en-us.

It matches more elements than the [lang|=] selector insofar as it matches according to language, which is inherited (in HTML), rather than attribute value, which can only be specified on a tag.




@charset

This states the encoding method of the document, may only appear in external style sheets, and must be the very first thing of the file, with not so much as a space before it:

@charset "ISO-8859-1"; /* This is the only character set most Western authors need */




Non-left-to-right text

Non-left-to-right text has often been difficult to achieve. With CSS-2, however, two properties are provided to cope with this.

Direction

The direction property is used to specify the direction of text. Direction: ltr (initial value) specifies that text goes left-to-right, and direction: rtl, right-to-left. Direction is inherited. However, it only affects inline-level elements if their unicode-bidi is embed or override.

Note that of itself direction does not affect the direction of text because directionality is implicit to the text. For example, this paragraph has dir=rtl. This will not affect the direction of the text in the paragraph because the paragraph's characters are implicitly left-to-right. The exception to this is when unicode-bidi is set to bidi-override, which overrides this default behavior.

Unicode-bidi

It is very common that (mainly right-to-left) text has text going in multiple directions within it. The unicode-bidi property specifies the behavior in this case.

Valid values are normal (initial value), embed and bidi-override.

Unicode-bidi is not inherited.

The values specify behavior with respect to the Unicode bidirectionality algorithm. Normal means that the element does not open a new embedding level. Implicit (that based on characters rather than elements) reordering is effective across inline-level element boundaries.

If specified on an inline-level element, embed means that the element opens a new embedding level. The direction of the level is supplied by direction.

Bidi-override creates an override if specified on an inline-level or block-level element that only has inline-level descendants. This overrides implict reordering.

Bidi examples

Although the initial value for unicode-bidi is normal, in the browser style sheet all block-level elements are given unicode-bidi: embed.

Thus you have by default [Inline-level elements] {unicode-bidi: normal} [Block-level elements] {unicode-bidi: embed}.

As a result, say you have:

<P style="direction: rtl">
Left-to-right text AND THIS IS RIGHT-TO-LEFT
</P>

There is no problem here - the P element has unicode-bidi: embed (because of the UA style sheet), which means that it can cope with one level of text with different directionality, and the text will be correctly rendered.

However, say you have:

<P>
<SPAN>THIS IS RIGHT-TO-LEFT <Q>this is left-to-right within that SPAN</Q></SPAN>
</P>

Because the SPAN has unicode-bidi: normal, it cannot cope with implict reordering, and the rendering will not be correct. To override this, it is necessary to add unicode-bidi: embed to the SPAN element. This will create a new embedding level so that implicit reordering can take place.

If the text has already been placed in visual order, you might wish to suppress reordering. For example, if you have this piece of text: 'WERBEH' that has already been placed in visual order, to stop reordering according to the implicit directionality of the text you must add a bidi-override. Thus <SPAN style="unicode-bidi: bidi-override">WERBEH</SPAN> would prevent reordering and simply render the text in the direction specified (or inherited) by the direction property. In this case the appropriate direction is direction: ltr, because it is appropriately ordered for that.

Differences between CSS and HTML bidi

  1. In HTML, direction is only inherited to block-level descendants. In CSS direction is inherited to all elements, the differences between block-level and inline-level descendants is made by means of the unicode-bidi property.
  2. In HTML specifying direction automatically opens a new level in the bidi algorithm; in CSS you have to specify unicode-bidi: embed to achieve this.
  3. In HTML the dir attribute is required when you specify a bidi-override; in CSS because direction is inherited, this isn't necessary.

This is the end of the CSS2 guide. I would strongly recommend that you now read the master class so that you can hone your skills to true style sheet mastery, the bug guides, so that you can make sure that your styles work, or simply the front page so you can access it all.



Be the first one to comment on this page.




  CSS 2.0 eBooks
More Links » »
 
 CSS 2.0 FAQs
More Links » »
 
 CSS 2.0 Interview Questions
More Links » »
 
 CSS 2.0 Articles

No CSS 2.0 Articles could be found as of now.

 
 CSS 2.0 News

No News on CSS 2.0 could be found as of now.

 
 CSS 2.0 Jobs

No CSS 2.0 Articles could be found as of now.


Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previoushome

Keywords: CSS2 Properties - Language styles, CSS2, css2, CSS2 tutorial, CSS2 tutorial pdf, history of CSS2, Custamizing Style Sheet, learn CSS2

HTML Quizzes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML Quiz
XML Quizzes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizzes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizzes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizzes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizzes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building Quizzes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizzes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizzes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizzes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizzes
Oracle Quiz
MySQL Quiz
Operating System Quizzes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizzes
Testing Quiz
Firewalls Quiz
SAP Module Quizzes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizzes
Corba Quiz
Networking Quiz
Microsoft Office Quizzes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizzes
Financial Accounting Quiz
Managerial Accounting Quiz
Testimonials | Contact Us | Link to Us | Site Map
Copyright ? 2008. Academic Tutorials.com. All rights reserved Privacy Policies | About Us
Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Jobs Assist | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Webhosting in India | Dedicated Server in India | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Tests World | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World | Important Websites
Copyright ? 2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved.