Page 170 - Webapplication11_C11_Flipbook
P. 170

2.5 COMMENTS IN HTML

              Comments in HTML are used to insert notes or explanations within the code that are not displayed in the web browser.
              These comments can help developers understand the code structure, provide instructions, or temporarily disable a
              part of the code during testing without deleting it.

              The syntax for HTML comment is as follows:

              <!-- This is a comment -->
              Let us use comment in HTML.

              <html>
              <head>

              <title>Introduction to Artificial Intelligence</title>
              </head>
              <body>

              <h1>Introduction to Artificial Intelligence</h1>
              <!-- This paragraph introduces the concept of AI -->
              <p>Artificial Intelligence (AI) refers to the simulation of human intelligence in
              machines that are programmed to think and learn like humans.</p>
              </body>

              </html>
              In the given example, the comment explains that the following paragraph describes what Artificial Intelligence (AI)
              is. Comments help anyone reading the code understand its purpose without affecting what is displayed on the page.

                 2.6 LISTS IN HTML

              A list is a collection of related items that can be used to represent information in pointed form. In our daily routine,
              we have to write many things such as list of items required for a festival and list of steps to make a dish. List feature of
              HTML5 allows us to display this type of information on the web page in an organised manner. There are three types of
              lists named ordered list, unordered list and definition list that can be created in HTML5 to display the items in the form
              of list. Let us learn about these in detail.

              Ordered List

              An ordered list is also called the numbered list. This type of list is used to display the items in a sequential manner. For
              example, steps in an algorithm, etc. In HTML, the <OL> tag is used to create an ordered list.
              The <LI> tag is used to define an item in the list. It can be used as an empty tag as well as a container tag. The <OL> tag
              have two attributes named TYPE and START which you can use in the following way:

              Ð Ð<OL Type ="A"> - will start the list from A.
              Ð Ð<OL Type ="a" Start="4"> - will start the list from d.
              Ð Ð<OL Type ="1" Start="25"> - will start the list from 25.

              Ð Ð<OL Type ="I" Start="2"> - will start the list from II.
              Ð Ð<OL Type ="i" Start="4"> - will start the list from iv.







                168     Touchpad Web Applications-XI
   165   166   167   168   169   170   171   172   173   174   175