Web Technologies - Old Questions

Question Answer Details

2.  Define DTD. What are its applications? Create the HTML document with the paragraph using <p>,<h1>, <strong> for the first word for every sentence and <em> for all the capital letters.

10 marks
Asked in 2068

Answer

AI Generated Answer

AI is thinking...

Official Answer

DTD (Document Type Definition) defines the legal building blocks of an XML documents. It is used to define document structure with a list of legal elements and attributes. DTD can be classified on its declaration basis in the XML document, such as −

  • Internal DTD: A DTD is referred to as an internal DTD if elements are declared within the XML file.
  • External DTD: A DTD is referred to as an external DTD if elements are declared outside the XML file.

Application:

  • With a DTD, independent groups of people can agree on a standard DTD for interchanging data.
  • An application can use a DTD to verify that XML data is valid.

Now, 

<!DOCTYPE html>

<html>

 <head>

    <title>Nepal</title>

 </head>

 <body>

    <h1>My Country Nepal</h1>

    <p><strong><em>M</em>y</strong> country <em>N</em>epal is situated between two large countries <em>C</em>hina and <em>I</em>ndia <br />

    <strong><em>I</em>t</strong> is well known for it cultural diversity.<br/>

    <strong><em>P</em>eople</strong> around the world visit <em>N</em>epal for tourism.<br/>

  <strong><em>N</em>pal</strong>is agro-based country.<strong><em>S</em>ixty</strong> five percentage people completely depend on agriculture in <em>N</em>epal.</p>

 </body>

</html>