|
Writing HTML | About | FAQ | References | Tags | Lessons | previous | next |10. Special CharactersHow do you say... >>>Æ ñ Þóßÿ ?NOTE: If the above characters do not display various accents or diacritical markers, then your web browser does not support the ISO character set. You would likely want to skip this lesson. ObjectivesAfter this lesson you will be able to:
LessonNote: If you do not have the working documents from the previous lessons, download a copy now. Accent MarksSometime you may need to use a special character in an HTML document, an accent or diacritical mark. The ones that are known as ISO These special characters are marked in HTML as: &xxxx; where XXXX is the code name for the special character. To create the special character for the German umlaut (ü), we need to use the HTML: ü For example, in the Terminology section of our Volcano lesson, we want to add an explanation of a technical term that was used to describe a particular type of volcanic flow. This term nuee ardente is from the French term for "glowing cloud"; but to use the proper spelling we need an "acute" accent, so that the word appears as nuée ardente. In this case, we replace the first e in nuee with the HTML for the acute accented "e" é: nuée ardente For reference on these codes, see the list of special ISO characters. Now we will add a sentence to our HTML document that uses an accented letter:
HTML Escape SequencesThe HTML for the accent mark is an example of the more general class of tags known as escape sequences. In entering HTML so far, you may have wondered what you do when you need to use a < (less-than) or a > (greater-than) sign? These two characters, plus the & (ampersand) have special meaning in HTML and cannot be used as typed. Instead, use the escape sequences: < is used for < > is used for > & is used for & Now let's apply one of these symbols in our Volcano lesson. In the previous: , we added a table that lists several volcanoes and how much material was erupted from each. Let's say one of the values (500-600) for Long Valley is not very accurate (often such values are estimates), and we would like the entry to read >450 & <700. To do this:
Extra SpacesAs you may have seen, a web browser will ignore all extraneous spaces in your HTML files. However, there may be times when you really want to have more than one space. When? Some writers like to have two spaces following the period at the end of the sentence. What if you wanted to indent the first sentence of every paragraph? How about having a single word with its individual letters spaced far apart? An HTML code for adding a space character is the special character known as the "non-breaking space": Here are some examples of how you might use the non-breaking space:
You may want to experiment with different ways to use the non-breaking space. At this time, we will not modify our HTML documents, but you may, if you wish, add the code for indenting each opening sentence of all paragraphs using two instances of the special code for the non-breaking space. For more information on paragraph indentation, see Jim Barchuck's Stupid HTML Indent Tricks. Check Your WorkCompare your document with a sample of how this document should appear. If your document was different from the sample, review the text you entered in the text editor. Be sure that you have correctly bracketed the escape sequences with the & and ; characters. More InformationHere are some more special charcters that you may find useful:
See also the extensive list of special characters from WebMonkey. ReviewReview topics for this lesson:
Independent PracticeIn your own HTML document, add a foreign word that requires a special accent or a mathematical expression that uses the < or > symbol. Or, add some extra spaces to indent your paragraphs. Coming Next....Build a bibliography using a descriptive list. GO TO.... | Lesson Index | previous: "Preformatted Text" | next: "Definition Lists" |
Writing HTML: Lesson 10: Special Characters |