Cascading Style Sheets Tutorial

Site Reconstruction: use CSS to improve website accessibility

  CSS can be used to improve website accessibility 

  Recently, I had no choice but to one of my clients to update the old site, enables it to achieve accessibility standards.    On the 34-old mining code is not the idea attractive, mainly because I have used a lot of programming practice is no longer applicable, especially from the visit of speaking.    I have used the absolute font size, a fixed width and page layout do form and space allocation. 

  At that time, like many construction sites, the website of my customers use the Cascading Style Sheets (CSS) for formatting text.    It does not use any CSS more powerful layout features, but also did not allow HTML equipment independence, and this is CSS can visit one of the main advantages. 

  The question is how? 

  I have outlined in the website more accessible way, the current understanding of many of the causes of the problem visit may be helpful: 

  Superficial understanding of HTML: in the 1990s, the period for the development of the Internet, everyone started construction site.    WYSIWYG editor makes almost everyone can easily build a Web site, and not bother to learn HTML.    Unfortunately, however, the use of such facilities has had some bad code, the visit of causing prejudice. 

  HTML design limitations: developers, and designers often deliberately wrong with HTML tags, especially <table> labels to overcome in the HTML layout and design limitations.    This design approach will bring hinder accessibility code. 

  What makes CSS more visits? 

  CSS appeared in 1996, to solve the above problems.    By using CSS, you can be an HTML document, the content of the performance of its form or style, left to the information.    This application allows you to achieve accurate formatting and layout to be designed without the use of screen reader might make and specialized browser software have confused the HTML code. 

  For example, although HTML form is used to format data on the row, but they are often used to align an array elements on the page.    But reader and voice synthesizer software requires effective HTML code.    So when they encounter a page of the erroneous use of elements such as a table, the result will allow users am baffled. 

  CSS another visit of the advantages is that it allows users to define their own style alone, this style with single-style single-site work together.    Thus, for example, a user can set all through <p> tag should be the definition of the text is 1.5 em Arial, even if the site's style that it should be a single 18 px Verdana Bold. 

  Attention should be paid to user-defined style only the user's name and style of HTML pages in line with the label, will work, which is very important.    This will ensure compatibility of the responsibility of the hands of the hands of developers.    For example, if the user-specified style <p> 1.5 labels should show em Arial text, but the HTML pages do not use labels to <p> Calling from a single style style (maybe it uses <font class = "bodytext"> ), the user <p> definition of style tags will be ignored.    Therefore you should ensure that your heading and paragraphs using standard HTML tags, which will reduce the user-defined style single-neglected opportunities. 

  Start 

  If you are starting from scratch to build a new web site, then through CSS to improve accessibility will be very easy.    But you can still easily change the existing site for the CSS form. 

  Step 1: Check the existing code 

  In order to better that I would be used in Table A of this simple HTML code to represent a use CSS pages.    The examples assume that page does not have the use of CSS, but you can also use similar methods to evaluate the site based on the CSS.    The main difference is that most of the changes will occur in the CSS document rather than HTML documents. 

  Step 2: Remove from HTML tags all special style 

  In this page to add CSS, first of all, I need to be relieved of all to control the content of the performance of labels.    Sample code using the font tags to define appearance of fonts, styles and colors.    Remove these elements make sample code shown in Table B. 

  Step 3: Remove from HTML and replace any misuse of the label 

  I would now like to remove any wrong with HTML tags.    In the sample code, a table of contents of the page to create a pixel on the verge of 15, the code also uses <br> labels to create paragraphs. 

  I remove the forms and labels <br>, I will replace them for the appropriate label.    For example, I use the page title <h2> labels, with <p> labels to show paragraphs.    Use standard HTML tags makes the CSS after the application very easily, but with the single-user-defined style more compatible.    The code samples shown in Table C. 

  Step 4: Construction of a document to cover CSS style information 

  I have now removed from the HTML document all the style information, I need this information will be transferred to a CSS file.    CSS is only a document for the deposit. Css extension of the text file, so it can be in any text editor to create conducted.    I use the Dreamweaver MX. 

  In order to use CSS in HTML documents easier, I use the name and h2 p corresponds to the style standard HTML tags.    I use the variable font size, enables users to easily in the browser increased or reduced font size.    Use the absolute size can prevent browser font size adjustments (except for Netscape 6 or later versions, it will not consider absolute font size).    I am still in need of places designated font type, weight and color. 

  Have to re-create code from the HTML tag layout, I need to be <p> and <h2> tag set width of 780 pixels.    However, as our objective is to maximize accessibility, so I will remove the width settings allow pages to the browser window size.    And I will make HTML pages using the default browser edge, and not the original code labels <table> 15 pixels to re-create the gaps, which also makes other equipment such as printers to use its default Edge settings. 

  Table D shows I created CSS document.    I will name it for Mystylesheet.css and placed in the root directory under the Web site of a style of the folder. 

  Step 5: In the HTML document additional new style single - 

  In the creation of the CSS document, I inserted in the HTML file its style.    HTML document has been included because all the documents cited in the CSS tags (<h2> and <p "), I only need to link to the HTML document style head-on it.    HTML documents obtained documents from the CSS style and their application to <h2> and <p> tag, as shown in Table E. 

  Step 6: validation code 

  The whole process is the final step in the HTML code validation of the visit.    If you are a novice, CSS, you have the best of the CSS code to verify.    There are different types of tools can help you verify the others. 

  I use Dreamweaver MX to check my sample code accessibility.    You can choose the File menu and select Check Page Check Accessibility to achieve.    Any error or warning will be displayed, including the emergence of location of the trip, as well as a brief explanation of the problem.    You can Dreamweaver MX tools found in the Reference more information on these errors and warnings content.    Dreamweaver you need from the Windows menu and select Reference Book from the menu and then select the UsableNet Accessibility Reference on it. 

  In addition, the World Wide Web Consortium (W3C) has provided over 30 can visit assessment tools links.    W3C also provides HTML and CSS for the free Web-based validator. 

  Accessibility and simple management 

  Although the examples given here is very simple, but it demonstrates that the use of CSS to your site more accessible is very easy.    Moreover, the use of CSS for more than just one of the advantages of this. 

  Based on CSS only sites than just HTML Web site management much better.    CSS style in the document changes can be applied to the entire site without the need to change any of the site HTML file.    And the use of CSS narrowing every HTML document the overall file size, because all the information is stored in the style of the CSS document. 

  So if you want to improve the accessibility of the case, be regarded as an opportunity rather than an obstacle.    To learn more about CSS and accessibility of the content, you can go to look at the World Wide Web Consortium in the Web Accessibility Initiative (WAI). 

  Taoba new website on the line 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Tags: css layout Record website, css website, w3c website w3c statement w3c css

Releated Posts

  • Translation: website design reasonable framework css
  • Resource sharing: Learning CSS related resources website
  • Web Design: Use CSS stands to accelerate your website
  • Let css website effects of translucent picture of web pages
  • Share with you the outstanding 20 CSS framework website

This entry was posted on Saturday, February 9th, 2008 at 12:00 am and is filed under Xhtml and Web Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Html forms and the use of mixed CSS web design
Against various versions of the browser hidden skills of CSS IX »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial