Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 65 - 2629_Devagiri_C-7
P. 65

    <BODY>
     BASIC HTML TAGS
                     <H1> The Road Not Taken</H1>
     HTML provides various tags such as <Hn>, <P>, <BR>, <HR>, <B> and many more. Let’s now discuss   <H2> by Robert Frost</H2>
     tags in detail.
                     Two roads diverged in a yellow wood, <BR>
     THE <Hn> TAG    And sorry I could not travel both <BR>

     <Hn> tags define headings in HTML, from <H1> (largest)   And be one traveler, long I stood <BR>
     to  <H6>  (smallest). They are container  tags  used to   When you use a heading tag,
     organise web page content.  web browsers automatically add   And looked down one as far as I could <BR>
     space (margins) above and below   To where it bent in the undergrowth
     The syntax for using the heading tags is as follows:  the heading.
                     </BODY>
     <Hn> Content of the Heading </Hn>
                     </HTML>
     Code
     1  Write the HTML code to present the given web page using the <Hn> tag.  THE <HR> TAG

                     The <HR> tag is used in HTML to insert a horizontal rule that visually separates sections of content
     <!DOCTYPE HTML>
                     on a web page. It is typically used to divide sections within the page.
     <HTML>

     <HEAD>             Code     Write the HTML code to present the given web page using <HR> tag.
                          3
     <TITLE> Using Headings </TITLE>

     </HEAD>         <!DOCTYPE HTML>
     <BODY>          <HTML>

     <H1>Artificial Intelligence </H1>  <HEAD>
     <H2>Artificial Intelligence </H2>  <TITLE> Using HR Tag </TITLE>

     <H3>Artificial Intelligence </H3>  </HEAD>

     </BODY>         <BODY>
     </HTML>         <H1> The Road Not Taken</H1>
                     <H3> by Robert Frost</H3>
     THE <BR> TAG
                     <HR>
     Pressing Enter in HTML doesn’t create a new line; text flows continuously. Use the empty <BR> tag
                     Two roads diverged in a yellow wood, <BR>
     for line breaks.
                     And sorry I could not travel both <BR>
     Code
     2  Write the HTML code to present the given web page using the <BR> tag.  And be one traveler, long I stood <BR>
                     And looked down one as far as I could <BR>
     <!DOCTYPE HTML>
                     To where it bent in the undergrowth
     <HTML>          <HR>
     <HEAD>          </BODY>

     <TITLE> Using BR Tag </TITLE>  </HTML>

     </HEAD>

                                                                                                                      63
                                                                                                 HTML5–Getting Started

| 60 61 62 63 64 65 66 67 68 69 70 |