Page 37 - DCAP202_Fundamentals of Web Programming
P. 37

Fundamentals of Web Programming




                    Notes          Self Assessment

                                   Fill in the blanks:
                                   1.  HTML ........................... tell a web browser where the HTML part in your document begins
                                       and ends.

                                   2.  The “...........................” contains all of the document’s  header information like the web
                                       document’s title and information about the document itself.
                                   3.  The HTML pre element inserts a block of ........................... text.

                                   4.  A ........................... tag controls how the characters are formatted.
                                   5.  A ........................... tag describes how the text is being used, not necessarily how it is formatted.
                                   6.  The ........................... font style slants the text to the right and thus can also be used to draw
                                       special attention to one or more words.

                                   3.2 Structure of an HTML Program

                                   A HTML document is basically separated in two parts: the head (HTML head tag) and the body
                                   (HTML body tag). We also add a Document type declaration on top of it to get the basic document
                                   structure and HTML version

                                   3.2.1 Basic Structure

                                   The structure of a HTML document is shown below.
                                   Structure of HTML Program
                                   <!  DOCTYPE  …>  version  information
                                   <HTML>
                                     <HEAD>
                                    ...information about document, scripts, styles….
                                     </HEAD>
                                     <BODY>
                                     ...visible  content  of  document….
                                     </BODY>
                                   </HTML>
                                   <HTML> tag: The html tag acts as a container for the whole document. Every character in the
                                   document should be in between the html start and end tags. The html tag can also be used to
                                   define the language of the contained document through the “lang” attribute. The content of the
                                   html tag is divided in two parts using the head (HTML head tag) and the body (HTML body tag).
                                   <HEAD> tag: This section is the document’s head. All the information contained in the document’s
                                   head is loaded first, before any  other thing in the document, as it’s defined before the body
                                   segment. It includes tags like title, script, style, meta and so on.

                                   <BODY> tag: This is the document’s body. The body is the container for the visual part of a
                                   document. All the things written here will be shown when the document is rendered. Most of
                                   the tags in HTML can be inserted in the body section (inside the HTML body tag) and will take
                                   care of the visual aspects of the document.








          30                                LOVELY PROFESSIONAL UNIVERSITY
   32   33   34   35   36   37   38   39   40   41   42