Chapter: Internet & World Wide Web HOW TO PROGRAM - The Ajax Client - Introduction to XHTML

| Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail |

meta Elements - XHTML

Search engines help people find websites. They usually catalog sites by following links from page to page (often known as spidering or crawling) and saving identification and classifi-cation information for each page.

meta Elements

 

Search engines help people find websites. They usually catalog sites by following links from page to page (often known as spidering or crawling) and saving identification and classifi-cation information for each page. One way that search engines catalog pages is by reading the content in each page’s meta elements, which specify information about a document.

 

Two important attributes of the meta element are name, which identifies the type of meta element, and content, which provides the information search engines use to catalog pages. Figure 4.15 introduces the meta element.

        <?xml version = "1.0" encoding = "utf-8"?>

 

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

 

              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 

        <!-- Fig. 4.15: meta.html -->

 

        <!-- meta elements provide keywords and a description of a page. -->

 

        <html xmlns = "http://www.w3.org/1999/xhtml">

 

              <head>

 

                     <title>Welcome</title>

                       <!-- <meta> tags provide search engines with -->

 

                       <!-- information used to catalog a site -->

 

                       <meta name = "keywords" content = "web page, design,

 

                             XHTML, tutorial, personal, help, index, form,

 

                             contact, feedback, list, links, deitel" />

 

                       <meta name = "description" content = "This website will

 

                             help you learn the basics of XHTML and web page design

 

                             through the use of interactive examples and

 

                             instruction." />

 

                </head>

 

                <body>

 

                       <h1>Welcome to Our Website!</h1>

                       <p>We have designed this site to teach about the wonders

 

                       of <strong><em>XHTML</em></strong>. <em>XHTML</em> is

 

                       better equipped than <em>HTML</em> to represent complex

 

                       data on the Internet. <em>XHTML</em> takes advantage of

 

                       XML’s strict syntax to ensure well-formedness. Soon you will know about many of the great features of

 

                       <em>XHTML.</em></p>

                       <p>Have Fun With the Site!</p>

 

                </body>

 

</html>


 

Fig. 4.15 |  meta elements provide keywords and a description of a page.

 

Lines 13–15 demonstrate a "keywords" meta element. The content attribute of such a meta element provides search engines with a list of words that describe a page. These words are compared with words in search requests. Thus, including meta elements and their content information can draw more viewers to your site.

 

Lines 16–19 demonstrate a "description" meta element. The content attribute of such a meta element provides a three- to four-line description of a site, written in sentence form. Search engines also use this description to catalog your site and sometimes display this information as part of the search results. Note that this use of the meta element is one of many methods of search engine optimization (SEO). For more information on SEO, visit Deitel’s SEO Resource Center at www.deitel.com/searchengineoptimization.

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail


Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.