Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 101 - CodePilot V5.0 C6
P. 101

    There should not be any space within the tag. For example, < T A G> is incorrect.  THE <BODY> TAG

       All container tags require a closing tag with a forward slash followed by the tag name.  The <BODY> tag is a container tag. It defines the section of the HTML document that is visible in
       Tag names must be enclosed in angle brackets without spaces.  the web browser. It contains all other tags that define the content and presentation elements,
                     such as images, text, lists, tables and links for navigating between web pages.
       When nesting, the inner tag should be closed before closing the outer tag.

       An attribute should be present in the opening tag.
                            CREATING AND SAVING AN HTML DOCUMENT

     STRUCTURE OF AN HTML5 DOCUMENT  To create your own web page, you need a text editor. You can use any text editor, such as Notepad,

                     Sublime Text, Vim or VS Code and view the page in a web browser, like Microsoft Edge, Google
     The basic structure of an HTML document is as follows:
                     Chrome or Mozilla Firefox. Notepad is the default text editor in Windows 11.
     <!DOCTYPE HTML>  To create and save an HTML document, follow the given steps:

     <HTML>

     <HEAD>
                                                                                                2    Click on the File menu
     <TITLE>Title of the web page</TITLE>  Head Section
                                                                                                from the Menu bar.
     </HEAD>

     <BODY>                                             1    Open the Notepad text
                                                       editor and write the HTML
     Content of the Web page   Body Section
                                                       code.
     </BODY>                                                                       3    Click on the Save option
                                                                                   from the drop-down menu.
     </HTML>

                     The Save as dialog box appears on the screen.
     THE <!DOCTYPE HTML> TAG
                                                                               4    Choose the location where
     All HTML5 documents start with <!DOCTYPE HTML>, telling the browser to interpret the document   you want to save the document.
     as HTML5.
                               SHORT SIGN

     THE <HTML> TAG         To save the current file

     The <HTML> tag is the root of an HTML document. The <HTML> tag is the container tag for all other   with a different name:
     HTML elements, except for the <!DOCTYPE HTML> declaration.  Ctrl + Shift + S

     THE <HEAD> TAG
     The <HEAD> tag contains metadata about the web page. It includes tags that provide information
                         5    Type the desired name for your
     about the web page but are not displayed directly on the page itself. Tags that can be placed   document in the File name text box,
     inside the <HEAD> tag include <TITLE>, <STYLE>, <SCRIPT> and <META>.  followed by the .html extension.

     THE <TITLE> TAG                                                    6    Click on the Save button.

     The <TITLE> tag is a container tag. It defines the title of the document. It can only contain text and
     it is displayed on the web browser’s title bar or the page’s tab.
                     The document will be saved with the given name.

                                                                                                                      99
                                                                                                 HTML5–Getting Started

| 96 97 98 99 100 101 102 103 104 105 106 |