Appendix K Introduction to XHTML: Part 1 1445 (Web hosting isp)
Appendix K Introduction to XHTML: Part 1 1445 On line 20, we introduce the br element, which most browsers render as a line break. Any markup or text following a brelement is rendered on the next line. Like the imgelement, br is an example of an empty element terminated with a forward slash. We add a space before the forward slash to enhance readability. K.8 Special Characters and More Line Breaks When marking up text, certain characters or symbols (e.g., <) may be difficult to embed directly into an XHTML document. Some keyboards may not provide these symbols, or the presence of these symbols may cause syntax errors. For example, the markup
if x < 10 then increment x by 1
results in a syntax error, because it uses the less-than character (<), which is reserved for start tags and end tags such as
and
. XHTML provides special characters or entity references (in the form &code;) for representing these characters. We could correct the previous line by writing
if x < 10 then increment x by 1
which uses the special character < for the less-than symbol. Figure K.9 demonstrates how to use special characters in an XHTML document. For a list of special characters, see Appendix M, Special Characters. 1 2 4 5 6 7 8 9
10 12 13 14 15 16 17 1819 Click 20 here 21 to open an e-mail message addressed to 22 deitel@deitel.com. 23
24 25
26 Fig. K.9 Fig. K.Fig.Fi K.9g. K.99Inserting special characters into XHTML. (Part 1 of 2.) Fig. K.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.