Shine Tutorial    
  shinetutorialtopsideimage
HOME DOS OS C,C++ HTML CSS XML JAVA ASP PHP SQL OFFICE MULTIMEDIA MORE... CERTIFICATION ABOUT
 
S T ADVT
TUTORIALS


 

DTD - Entities

« Previous Next Chapter »

Entities are variables used to define shortcuts to standard text or special characters.

  • Entity references are references to entities

  • Entities can be declared internal or external


An Internal Entity Declaration

Syntax

<!ENTITY entity-name "entity-value">

Example

DTD Example:

<!ENTITY writer "Donald Duck.">
<!ENTITY copyright "Copyright W3Schools.">

XML example:

<author>&writer;&copyright;</author>

Note: An entity has three parts: an ampersand (&), an entity name, and a semicolon (;).


An External Entity Declaration

Syntax

<!ENTITY entity-name SYSTEM "URI/URL">

Example

DTD Example:

<!ENTITY writer SYSTEM "http://www.shineinstitute.com/entities.dtd">
<!ENTITY copyright SYSTEM "http://www.shineinstitute.com/entities.dtd">

XML example:

<author>&writer;&copyright;</author>

« Previous Next Chapter »