HTML/CSS/Style Basics/entity

Материал из Web эксперт
Перейти к: навигация, поиск

A browser interprets only the following characters as whitespace: space ( ), tab ( ), newline ( ), and return (
).

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body> 
<h2>Embedding Space Entities</h2> 
space (&#x0020;), tab (&#x0009;), newline (&#x000A;), and return (&#x000D;)
</body> 
</html>



Bottom ↓

 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
</style>
</head>
<body>
<h1>Inline Box</h1> 

<span class="box">Bottom &darr; </span> 

</body> 
</html>



Copy sign

 

<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
   </head>
   <body>
      <p>All information on this site is <strong>&copy;</strong>
   </body>
</html>



Display Quote

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Phrase elements</title>
<style type="text/css">
</style>
</head>
<body>
<p><code>#!/usr/local/bin/perl<br />
  print &quot;<var>Content-type: text/html\n</var>&quot;;<br />
  print &quot;<var>Hello World\n</var>&quot;;</code>
</p>
</body>
</html>



Embedding Space Entities

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body> 
<h2>Embedding Space Entities</h2> 
<code>&amp;zwnj; </code>A&zwnj;A 
<code>&amp;thinsp; </code>Athinsp;A
<code>&amp;nbsp; </code>A&nbsp;A
<code>&amp;ensp; </code>A&ensp;A
<code>&amp;emsp; </code>A&emsp;A
</body> 
</html>



¼

 
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
   </head>
   <body>
      <p>Note: <strong>&lt; &frac14;</strong> of the information 
         presented here is updated daily.</p>
   </body>
</html>



← Left

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
</style>
</head>
<body>
<h1>Inline Box</h1> 

<span class="box">&larr; Left  </span> 

</body> 
</html>



Right →

 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
</style>
</head>
<body>
<h1>Inline Box</h1> 

<span class="box">Right &rarr; </span> 

</body> 
</html>



& sign

 

<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
   </head>
   <body>
      <p><strong>&amp;</strong> Associates, Inc. 2002.</p>
   </body>
</html>



Special Characters

 

Symbol            Description         Entity Name        Number Code
&                 Ampersand           &amp;              &#38;
<                 Less than           &lt;               &#60;
>                 Greater than        &gt;               &#62;
"                 Double quote        &quot;             &#34;
    
                  Non-breaking space  &nbsp;             &#160;



↑ Top

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
</style>
</head>
<body>
<h1>Inline Box</h1> 

<span class="box">&uarr; Top  </span> 

</body> 
</html>