Page 103 - CodePilot V5.0 C6
P. 103

BASIC HTML TAGS


                 HTML provides various tags such as <Hn>, <P>, <BR>, <HR>, <B> and many more. Let’s now discuss
                 tags in detail.

                 THE <Hn> TAG

                 <Hn> tags define headings in HTML, from <H1> (largest)
                 to  <H6>  (smallest). They are container  tags  used to          When you use a heading tag,
                 organise web page content.                                      web browsers automatically add
                                                                                space (margins) above and below
                 The syntax for using the heading tags is as follows:                     the heading.

                 <Hn> Content of the Heading </Hn>

                    Code
                      1      Write the HTML code to present the given web page using the <Hn> tag.


                 <!DOCTYPE HTML>

                 <HTML>

                 <HEAD>
                 <TITLE> Using Headings </TITLE>

                 </HEAD>
                 <BODY>

                 <H1>Artificial Intelligence </H1>
                 <H2>Artificial Intelligence </H2>

                 <H3>Artificial Intelligence </H3>

                 </BODY>
                 </HTML>


                 THE <BR> TAG
                 Pressing Enter in HTML doesn’t create a new line; text flows continuously. Use the empty <BR> tag
                 for line breaks.

                    Code
                      2      Write the HTML code to present the given web page using the <BR> tag.


                 <!DOCTYPE HTML>

                 <HTML>
                 <HEAD>

                 <TITLE> Using BR Tag </TITLE>

                 </HEAD>


                                                                                                                  101
                                                                                             HTML5–Getting Started
   98   99   100   101   102   103   104   105   106   107   108