English   Français

[Problems with the display? Problèmes d'affichage?]

Some English Commentary, Tips, and Tricks for using HTML to format the page, plus some very basic Notes on JavaScript
(Veuillez voir aussi en français une partie des renseignements ci-dessous/See a portion of this in French.)

  1. HTML or XML or XHTML?
    XHTML served as a form of HTML (using the MIME type text/html), is now starting to be preferred over HTML on the World Wide Web (XHTML can be used to link to XML content; XML is important in the semantic web; it's possible to create one's own semantic categories using XML; XML uses tree structures; trees--with roots, branches, and branches from the branches [though I myself tend to think of the XML structures as parenthetical comments inside of other parenthetical comments] are one kind of data structure; tables--or arrays of arrays--are another).
    XHTML has some similarities to HTML, but has its own peculiarities. Thus, persons interested in learning HTML might also be interested in learning about XML and XHTML! See the W3C Recommendation, XHTML 1.0, for information about XHTML, http://www.w3.org/TR/1998/REC-xml-19980210. For information about XML, see the W3C Recommendation, "Extensible Markup Language (XML) 1.0," http://www.w3.org/TR/1998/REC-xml-19980210.

    [Back to Top]
  2. FORMATTING TABLES: Sizing, Controlling Word-Wrap, Accesibility; and FORMATTING YOUR PAGE
    --traditionally web pages were configured using tables of pre-defined size (other kinds of tables are tables where the width is defined as a percentage of window width; or tables where the width is undefined):
    Some writers still use tables to format pages, although tables used to format a page may not be interpreted properly by voice browsers. Today CSS style codes can define the style (top-margin, left-margin, right-margin, width, padding, background color, border or not, and so on) of not only tables, but all sorts of divisions within the page (including p, span, div). Thus, these divisions, like tables, can be used to format a page. These can be layed out in rows and columns too with the float property (elements can be floated to the left or right of other elements; the float property is used only when the position of the element is specified as "relative"), or else with absolute or fixed positioning of these elements (the element is positioned on the web page with absolute positioning, and is positioned in the screen window, often relative to the page, with fixed positioning). Another trick with relative positioning is to set the block-progression or flow of text elements as top-to-bottom, left-to-right, or right-to-left. Careful though! A number of CSS attributes may not be supported by all browsers (the display attribute for example is not well-supported by Mozilla/Netscape browsers); or all possible values for a given CSS attribute may not be supported by all browsers.
    (See the W3C tutorial, Tableless Layout How-to" for a tutorial. See also the W3C tutorial, "Adding a Touch of Style" by Dave Raggett, for the basics of CSS style codes; also the W3C Recommendation, "Cascading Style Sheets, level 1" by Lee and Bos; and the working draft, "CSS Text Effects Module", which has information on word wrap in page divisions, for more information on how to define page divisions using CSS. Finally, see page 9 of the W3C's "Cascading Style Sheets, level 2, revision 1, CSS 2.1 Specification," "Visual Formatting Model", especially section 9.3, "Positioning Schemes," which explains absolute, fixed, and relative positioning; and sections 9.5 and 9.8.3, which explain about floating text elements; plus the W3C CSS3 Text Module for information about the block-progression property.)
    If you opt to set the size of a table in pixels, then perhaps you will want to also specify the precise size of the font and also the precise font type, rather than specifying a relative font size. If you go with the relative font size instead, the table size and column widths might be resized regardless of the pixel width to accommodate the changing content size (for example, the Mozilla browser, which never wraps longer text strings in a table cell that designate links, resizes the table to accommodate a longer text string designating a link; while the Internet Explorer browser can wrap longer text strings designating links).
    If you set the size of the font in pixels, you might also wish to use a fairly large font rather than the traditional relative font, to accommodate all users (D. Raggett whose HTML tutorials appear at the W3C and the W3C recommend accommodating all users.)
    A relative font size might cause reformatting of both tables of a fixed size specified in pixels and of tables sized as a percentage of window size using %.
    When specifying the table size is important for the visual layout of a page, an alternative is to specify table size in em. The size of tables specified in em's will vary according to the font size set by the user at the user's end. (For more information on sizing items in pages using the em, or the relative font size, you might want to check out: "Greating Elastic Layouts with the em Unit" by Zoe Gillenwater!)
    Some writers will nevertheless wish to specify page and column widths in pixels, particularly when the page has one or more images, because images are displayed most consistently when formatted in pixels.
    To display pictures or a family tree in a table, I like to either specify the table width in pixels or em, and then specify the column widths as a percentage of the table width. The table width specified this way will overflow, but will look fine in hand-held devices. And of course, if I want to widen my whole table, all I have to do is reset the overall width; I do not need to reset the column widths as they will still be displayed as the same percentage of the overall width. (For tables that display pictures, if the table width is set to be say 720 pixels, with four columns each 25% of the width, and a cell-padding of 5 pixels, then pictures that are 170 pixels wide will display nicely with bit of space on either side. If the table's creator replaces the pictures with larger pictures that are all say 190 pixels, all he/she needs to do is widen the table appropriately to 800 pixels (200 pixels for each picture times the four columns), and the format will stay consistent (that is the columns will be the same percentage of the new width, and their widths will not need to be specified again). However, all pictures must be resized the same amount for this trick to work for a table displaying pictures!)

    In any case, as noted, various browsers (Mozilla, Internet Explorer) may opt to wrap or not wrap longer text strings in the table cell. For example, if you've formatted a table in pixels, but have opted for a relative font, and some of your links fill the column width, some browsers will wrap these when the font is enlarged by the user causing the links to overflow the column, while other browsers will stretch your table column's width to contain the longer text.
    It's of course possible to control word-wrapping and text-wrapping completely in table cells yourself by inserting an additional division (a paragraph or other division) within the cells, but word-wrapping is not one of the possible attributes of table cells (for HTML versions 4.0, 4.01) so it does not work with style definitions of table cells; you have to first insert a division (p, span, or div) into the table cell and specify its style including text-wrap, word-wrap, and width:

    <style type="text/css">
    .section1
      {
      width:620; word-wrap:break-word
      }
    </style>

    You can specify the text-wrap property as well, as either normal, unrestricted, none, or suppress, for example,

    <style type="text/css">
    .section1
      {
      width:620; text-wrap:normal
      }
    </style>

    You can then insert a division or paragraph in the table cell using the following code:

    <td width="622">
    <p class="section1">
    cell contents here . . .
    </p>
    </td>

    If you set the style in the header section of your html page as shown above, the editing/rewriting of your page will be easier in most cases (the W3C has recommended that CSS be used this way).
    However, if you are using MS Word for the editing/rewriting of your page, you can use the following code without a style definition defined in the headers, since MS Word overwrites style definitions in the headers:

    <div style="width: 620; word-wrap: break-word;">
    content goes here . . . </div>



    [Back to Top]
  3. PLACEMENT OF STYLE CODES--Use CSS Style Sheets in the headers? Or specify style in the elements themselves?
    It's generally argued that the style codes are the best way to specify paragraph and division formats.
    The CSS style codes are normally placed in the headers; ideally just above the body tag--if there are no java script functions; otherwise, when there are java script functions (see below), the style is defined in the headers just before any java script functions are defined, since java script functions sometimes make use of the style definitions and so need to be defined after the style; of course, some web hosts incorporate the web page into the body of their own host-created pages and then the only place to place the style and java script function definitions is right under the body tag alas, or they will be truncated by the program that incorporates the page. To change the style of a page using style definitions at the page top, one just has to redo the style codes at the top and then check the new display in a few browsers to make sure the page looks right.
    MS Word of course, places the style information in the page element tags themselves, in the body, so it's not so easy to edit MS Word created pages using HTML; not only that, but, as noted above, any style definitions at the top of the page are compeltely overwritten (that is, obliterated) when a page is edited by MS Word--while style information that is specified in the element tags is left intact! (MS Front Page makes a better web editor thus perhaps than does Word, because it does not overwrite style codes at the top of the page. If you decide not to buy it, and do not want to go to writing straight HTML, you may have to learn to work with MS Word.)
    It's pretty simple to specify the style above the actual page; you can specify the style of more than one element in a single style sheet there:

    <style type="text/css">
    .elementone { STYLE }
    .elementtwo { STYLE }
    .elmentthree { STYLE}
    </style>

    However, if you are setting the general colors for link, hover, etc. for these elements, using a:link, a:visited, etc., you might want to place these definitions at the end of your style definitions for the elements, not at the beginning, for example:

    <style type="text/css">
    .elementone { STYLE }
    .elementtwo { STYLE }
    .elmentthree { STYLE }
    a:link { color: rgb(Red1, Green1, Blue1); text-decoration: none}
    a:visited { color: rgb(R2, G2, B2); text-decoration: none }
    a:active { color: rgb(R3, G3, B3X); text-decoration: none }
    a:hover { color: rgb(R4X, G4X, B4X); text-decoration: underline } /* mouseovr */
    </style>



    [Back to Top]

  4. JAVASCRIPT, JAVASCRIPT EVENTS
    • The Events Which Allow the Viewer to Interact With the Page.

      HTML is used to set the display for a document. JavaScript makes it all dynamic--that is, at least since HTML 4.0 was developed, JavaScript has been available for use with HTML as a code that web browsers are able to process, a simple language that can make the display of pages more dynamic.
      JavaScript provides a number of events. "Events" are places where the viewer can interact with a page, by downloading it, by clicking on a button, or whatever. These events are used to call JavaScript functions, that is, to cause a function to execute.
      Some events can be used multiple times in a single page to call functions; others cannot. Onload for example is an event which can be called on only once in a page; the onload attribute is normally placed in the Body tag or in an Img tag; when placed in the Body tag the function it is used to call will be executed right after the page loads.
      Other events are onunload, onclick, onmouseover, onselect. With these, a function can be set so as to occur when the end-user does something (loads a page, selects text) or when something has happened (an image has been completely uploaded).
    • Placing JavaScript Code in the Page.

      When writing in JavaScript, note that function definitions are traditionally placed right after the style definitions in the headers section of a page (alternately, these and the style definitions may be placed right after the body tag for cases where the host embeds a page in a host-generated page and there are no writer-controlled headers). This way, the JavaScript functions can use elements whose style is defined in the CSS style definitions.
      JavaScript code needs to be tagged! How else would the browser know it was not part of the text or something else? I'd begin JavaScript code with the following:

      <script language="javascript" type="text/javascript">
      Java script functions go here . . .
      </script>

      You do need to specify the language even if it is JavaScript, but perhaps you do not need to specify the type if the script is part of a text file as text files are the default MIME type. If it's text, that means it's not already compiled executable code.
      One source (http://www.webdeveloper.com) however says that the correct specification today is:

      <script type="text/javascript">

      As noted above, there is always an end tag after your actual code of course:

      </script>

      You call the functions defined between the two tags, as noted above, in the page itself, using the events.
    • Writing JavaScript Code For Different Browsers.

      There are at least two tricky points about JavaScript:
      (a), JavaScript is, unlike HTML, case sensitive, and in fact, spacing and case can be important in how JavaScript code is interpreted;
      (b), the various attributes and JavaScript functions allowed may vary with the browser type, so perhaps one of the first JavaScript functions you will want to learn to write is a good browser sniffer (or else you will need to borrow someone else's).

      For example, Mozilla does not open new windows which have been set up by the page creator (so much for those pop-up windows in Mozilla in which the programmer controls the window size and whether resizing, etc., is possible--

      onclick="window.open('URL','windowname' 'width=550, height=550, location=no scrollbars=no, resizable=no');"

      (But see student Svend Tofte's "Popup Windows" to see how windows are created for other browsers; but think twice before adding something that some viewers will not be able to see! If you follow Tofte's advice and specify a valid URL using the traditional href= with your window.open command, Mozilla will at least open that URL!)

      In addition, both Mozilla and Netscape browsers support a layered page; thus you can have several sections of the page literally on top of each other. When several layers are located in the same spot, only the one on top shows (but be careful with background images; I was unable to get these to work when I had several layers whose visibility I had specified as visible, all on top of each other). The level of a section (div, p, span) layer (the highest level layer will be on top) is determined by the z-index attribute of that section. A section is a property of the document (see below), and the properties of a document in a browser that supports layers are specified in Netscape 4.0 as document.LayerorElementName, and in Mozilla are specified as document.getElementbyId("LayerorElementName") . . .
      Older Internet Explorer browsers did not support layering and specified the properties with document.all; some newer Internet Explorer browsers support layering however, and the properties of a document might (maybe sometimes) be specified as document.getElementbyId or as document.all; but I'd use document.all.LayerorElementName for Internet Explorer!

      For example, if you had the following element defined in your style definitions,

      <style type="text/css">
      .textbox
      { color: rgb(0,0,153);
      border: none;
      left: 0%;
      padding: 1.0em;
      word-wrap: normal;
      text-wrap: none;
      background-color: rgb(255,255,204);
      visibility: visible; z-index: 5;
      } </style>

      you would address it in the various browsers as follows:

      <script language="javascript" type="text/javascript">

      document.textbox  // for Netscape 4.0 browsers
      document.getElementbyId("textbox") // for Mozilla, incl. Opera browsers
      document.all.textbox // for Internet Explorer browsers

      </script>

      To address its visibility for example, which is part of its style, you would use the addresses above:

      <script language="javascript" type="text/javascript">

      document.textbox.style.visibility  // for Netscape 4.0 browsers
      document.getElementbyId("textbox").style.visibility // for Mozilla browsers 
      document.all.textbox.style.visibility  // for Internet Explorer browsers (particularly IE 4.0) 
      

      </script>

      The "browser sniffer," if written as a separate function, can be called by other functions; so in my page it would be the first JavaScript function defined. The functions below it could then call the browser sniffer function and provide code specific to the browser that the sniffer had identified.
      The browser sniffer can be as simple as a single boolean function whcih sniffs for layers and returns either true or false! A simple, if else statement can then be used to write browser-specific code:
      
      // The code below is set for two basic classes of browsers--
      // those that use layers and those that do not;
      // the browser sniffer is built-in to the code for this function, rather than 
      // written as a separate function, as I recommend
      // the snippets of code below are adapted from a dnz tutorial
      
       if ((obj = getObj(layerID)) == false) 
      
         { 
            return false; 
         } 
      
      if (document.layers)
         { 
            // Code for Netscape browsers using document.ElementName 
            // You must specify the element name; don't just write "ElementName"
         ; 
         } 
      
      if (document.getElementById) 
         { 
           // Code for Mozilla browsers using document.getElementbyId("ElementName") 
           // Remember, you must specify the element name; don't write "ElementName" 
          ;
         } 
         else 
         { 
          // Code for Internet Explorer using document.all.ElementName
          // Again, you specify the element name 
          ;   
         } 
      


      The above is not really great code probably; I pulled the basics from a web site (dnz), but it can be made to work in both Mozilla and Internet Explorer! For more on writing browser-specific javascript code, including all the if statements you will need for the main four browsers, see "Browser compatible JavaScript and DHTML", a tutorial at Webconcerns (but, I have yet to get some JavaScript code that uses this browser sniffer to work in the Internet Explorer browser here--though it may be the rest of my code of course and not the browser sniffer)! Or you might want to check out the information on object detection at George Washington University's Web Resource Center "Introduction to JavaScript". They point out that there are just too many browsers out there to detect the exact browser always, but that it is possible to detect for the object you are searching for, for example to detect for the configuration document.images before using document.images in your program code!!
    • Basics of Writing: Controlling Code Flow; Specifying Window and Page Elements.

      Words like "if" and "else" in the code above control the flow of the function. Other words that control flow include "while" and "for."

      Everything in JavaScript is specified according to a hierarchy. JavaScript code is used to refer to objects, such as the document or an event, and to properties and methods that the objects can 'take on,' for example to the document's properties including its elements (such as div, p, or span). The dot notation-- . -- is used to specify the properties and methods (methods are 'built-in functions;' for example write is one of the built in functions of the document) of various objects, as well as to specify objects that belong to other objects (such as an element in a document). That is a . separates each object or property or method from its 'parent.'

      The CSS style attributes or properties such as border or text-decoration or z-index can be translated into JavaScript properties; these style attributes are properties which of course belong to a document element such as an image or a text-box (thus there is a hierarchy of belonging; the element they belong to--the image or text-box for example--is their parent element; but the image and text-box in turn have a parent, the document itself!). CodePunk provides an online list of CSS Properties and their JavaScript equivalents at their CSS Properties to JavaScript Reference Conversion. CodePunk also provides examples of how to address each of these properties for the various browsers.

      Like we've noted, different properties and names for them are often used by different browsers; at the link here Opera Software lists the properties and methods available for various objects in the Opera 6 browser: Web Specifications Supported in Opera 6.

      The order of these properties and methods is important; that is you cannot write URL.document; since the URL is a property of the document you must write document.URL. This is what I've just referred to as the "hierarchy of belonging."

      For a pretty thorough introduction to JavaScript that explains it in detail, looking at JavaScript objects, and the hierarchy of objects; at conditional statements and loops that control the flow of the JavaScript function; and also at the four basic JavaScript variables or data types (not discussed here), see Lee Underwood's "The JavaScript Diaries" at WebReference.com.

      Note: If you use document.all (Internet Explorer browsers), document.layers (older Netscape), or document.getElementById (Mozilla and its varieties) to specify the elements that are properties of the document (div, p, span, img), you are specifying the element using the id of the element. However, you can also specify the type of element rather than the id, using the document.getElementsByTabName statement. This kind of a statement can return you every table row or div or whatever in your document. However, it is a bit trickier to write such a statement as you might need to specify several levels of an element such as a table. For example, if you wanted to specify all the table rows in a particular table with the id of 'tbl' (located in a particular document), you would have to write the following statement:
      document.getElementById('tbl').getElementsByTagName('tbody')[0].getElementsByTagName('tr')
      
    • More.

      Another thing about JavaScript: count the parentheses-- (, ) and curly brackets, {, and } --above! Note that every opening parentheses or bracket must be appropriately closed.

      Here's a link to a tutorial: http://javascriptforum.tripod.com/basic.html
    [Back to Top]
  5. Example and Links to Help You in Identifying the Language of Your Content and Target Audience
    • How might one identify languages used on a page such as this?
    Take a look at an example for an HTML page:
    (for more examples, and for examples of language declarations in XHTML pages, please see, http://www.w3.org/International/tutorials/language-decl/.)
    :

    <head>
    <html lang="en">
    <meta http-equiv="Content-language" content="en, fr">
    </head>
    <body>
    <span lang="en"> English Content </span>
    <span lang="fr"> Contenu en français </span>
    </body>
    </html>

    The html tag in the code above (for a simple html page) includes information for the browser about the primary language utilised in the page; the meta tag specifies the languages, or rather, languages of the target audience (here there are two languages specified for two different target audiences, a bit odd but possible in the meta tag but in no other tag; note also that the meta tag here subsitutes for the http headers which is another way to specify the targeted audience's language); the span tags are used to identify the particular language of the text in a particular section of the page. (Source of the above information: W3C Working Draft, "Internationalization Best Practices".)
    • What are the tags available for the different languages and what kinds of things about the content language can be identified?

    You can tag the language, the script it is written in, and where the language is used. In the tag you can provide information about the specific variety of the language that is used in your pages, and more. But you need and should use only those tags that are absolutely essential to identify the language in question, that is you do not need to include irrelevant tags in your coding of the language. To see the tags available for languages, scripts, regions, and variants, see The IANA Language Subtag Registry; to learn more about what the tags mean and how to use them, see, Language Tags in HTML and XML.

    [Back to Top]

Un Petit Peu de commentaire sur le HTML--en français
(Information in English/Veuillez voir ces renseignements en anglais)

  1. LA CONFIGURATION DE VOTRE TABLEAU ET LA MISE-EN-PAGE DE VOTRE PAGE
    On a souvent utilisé les tableaux (par exemple, un tableau de taille fixée) pour configurer la page Web. Aujourd'hui, l'on vous conseille de ne pas utiliser des tableaux pour la configuration et mise en page de la page Web, ou au moins, de ne pas utiliser des tableaux très compliqués pour faire la mise en page-- le problème avec le tableau est que le tableau se construe par un navigateur audio comme une disposition de données.
    Les codes CSS se voient souvent comme des alternatifs aux tableaux pour configurer la page Web. Les codes CSS peuvent s'utiliser pour définir le style (c'est à dire, "top-margin", "left-margin", "right-margin", "width", "padding", "background color", "border" ou non, etc) de n'importe quelle division de votre page (y inclus, bien sûr, les éléments p, span, et div). Ainsi, on peut configurer (faire la mise en page) d'une page Web en précisant le style de ces éléments (p, span, et div).
    On peut, par exemple, configurer les éléments variés de la page (de façon que la page semble être arrangée en des lignes et colonnes) en utilisant l'attribut CSS float (comme l'attribut align, l'attribut float s'utilise--avec les valeurs "left", "right", et "top"--pour aligner un élément ou à la gauche ou à la droite d'un autre élément de la page; l'attribut CSS float ne s'utilise pas avec un élément sauf au cas où l'attribut position est précisé comme "relative" [c'est à dire relatif]). Si l'attribut position se définit comme "relative", il est possible de préciser aussi la valeur d'un autre attribut, block-progression (attribut qui s'utilise pour préciser le flux des éléments dans la page), ou comme "top-to-bottom" (d'en haut à en bas) ou comme "left-to-right" (de la gauche à la droite) ou comme "right-to-left" (de la droite à la gauche).
    Alternativement, on peut configurer les éléments de la page en utilisant l'attribut CSS position, qui s'utilise pour le placement de l'élément, au cas où la valeur de l'attribut position est précisée ou comme "absolute" (c'est à dire, absolue) ou comme "fixed" (fixée), mais pas au cas où la valeur de cet attribut est précisée comme "relative". Si l'attribut position se définit comme "absolute", il s'utilise pour préciser le placement de l'élément dans la page ou dans le document; si l'attribut position se définit comme "fixed" il s'utilise pour préciser le placement de l'élément dans la fenêtre de l'ecran, c'est à dire, dans l'affichage, où l'élément est mis en rapport au document par exemple. Mais, attention! Il y a, peut-être, plusieurs attributs CSS qui ne sont pas très bien compris par tout grand navigateur (l'attribut display, par exemple, n'est pas tellement soutenu par les navigateurs de type Mozilla/Netscape); ou, au moins, tout navigateur ne comprend pas peut-être tout valeur possible pour un attribut particulier.
    (Pour regarder un didactiel du W3C à propos de ce sujet, veuillez voir s'il vous plaît, 'Mise en page sans tableau pas à pas". Pour apprendre comment s'est fait le codage CSS, veuillez voir s'il vous plaît, un didacticiel du W3C, «Adding a Touch of Style» [didacticiel écrit par Daved Raggett]; veuillez voir aussi la recommandation du W3C, «Cascading Style Sheets, level 1» [par Lee et Bos]. Autre document du W3C, «CSS Text Effects Module» document en procès, fait disponibles des renseignements sur l'attribut word-wrap, et en plus, d'autres renseignements sur les CSS et sur comment on peut utiliser les CSS pour définir le style du texte dans la page. Finalement, veuillez voir la page 9 du document du W3C, «Cascading Style Sheets, level 2, revision 1, CSS 2.1 Specification», «Visual Formatting Model», et particulièrement, section 9.3, «Positioning Schemes,» où s'explique le schéma de placement des éléments dans la page [schéma qui s'utilise un attribut position, avec des valeurs, absolute (absolu), fixed (fixé), et relative (relatif)]; veuillez voir en plus les sections 9.5 et 9.8.3, où s'explique l'attribut CSS float. Veuillez voir aussi le W3C CSS3 Text Module pour des renseignements sur l'attribut block-progression.

    Pour trouver d'autres renseignements en français sur le html et les CSS, veuillez voir, s'il vous plaît, mon commentaire sur le didacticiel de Raggett, "Advanced HTML".)

    [Rentrer en haut]
  2. Un exemplaire et quelques liens qui vous aideront à préciser la langue de votre contenu et de vos spectateurs
    • Comment est-ce que l'on peut préciser les langues qui s'utilisent dans une page comme celle-ci?
    Voici l'exemple pour une page HTML qui suit
    (pour plus d'exemples et pour des exemples dans les pages XHTML, veuillez voir, s'il vous plaît, http://www.w3.org/International/tutorials/language-decl/.)
    :

    <head>
    <html lang="fr">
    <meta http-equiv="Content-language" content="fr, en">
    </head>
    <body>
    <span lang="fr"> English Content </span>
    <span lang="en"> Contenu en français </span>
    </body>
    </html>

    Il s'inclut dans la balise html ci-dessus (la deuxième des balises dans ce codage-ci où se définit une page HTML trés simple) des renseignements pour le navigateur sur la langue principale qui s'utilise dans la page; la balise meta tag y précise la langue ou en ce cas-ci les langues de tout spectateur visé (ici il y a deux langues précisées comme les langues des spectateurs--il est possible de préciser deux ou plusieurs langues dans la balise meta mais jamais en autre balise; remarquez de plus que la balise meta ici sert à remplacer l'en-tête http--où autrement on peut préciser la langue du spectateur visé); les deux balises span ici en chaque cas s'utilise pour préciser la langue d'un morceau de texte qui se trouve dans une partie particulière de la page. (Référence: W3C discours en procès, "Internationalization Best Practices".)

    • Quelle sorte de balises est-ce que l'on peut utiliser pour identifier les langues et quelle sorte de renseignements est-ce qu'on peut préciser avec ces balises?
    Vous pouvez disposer de plusieurs codes pour désigner la langue, et en plus, le script ou la graphie dont elle s'écrite, la region où elle s'utilise, et la variation spécifique de cette langue qui s'utilise dans votre page, et encore plus. Il ne faut pas bien-sûr utiliser tous ces types de codes chaque fois que vous précisez la langue de votre page et de vos spectateurs, ou celle d'un morceau de texte dans votre page, il ne faut que les codes qui sont absolument essentiels pour préciser la langue en question; c'est à dire, qu'il ne faut pas inclure dans votre codage des codes qui n'aideront pas à la reconnaissance de cette langue.

    Veuillez voir s'il vous plaît toutes les balises que l'on peut utiliser pour encoder les langues, les graphies, les regions, et les variations à The IANA Language Subtag Registry; Veuillez voir aussi, s'il vous plaît, des renseignements sur la signification des balises et comment il faut les utiliser, à Language Tags in HTML and XML.

    [Rentrer en haut]


 

(NOTE: I hope all display problems are resolved. There may still be some problems making this page display properly in several browsers--due perhaps to peculiarities of the yahoo site and because I am not yet a JavaScript pro [just learning too] thus, with some browsers, it may be necessary to return to the top of the page to select your language more than once if it ends up hidden after your initial selection!

J'espère que tout problème d'affichage dans cette page soit résolu. Mais il se peut que l'on trouve encore quelques petits trucs quand on essai de la faire afficher dans quelques navigateurs--à cause peut-être, des peculiarités de Yahoo et aussi par ce que je suis plus ou moins encore novice par rapport au JavaScript [j'apprends encore, comme vous!]; ainsi, si après la sélection initiale de langage, le texte-ci n'affiche pas en la langue de votre choix--il faut rentrer en haut de la page et cliquer sur la langue peut-être une ou deux fois de plus!)