Page 19 - HTML5
P. 19

An element usually consists of an opening tag (<element_name>), a closing tag (</element_name>),
        which contain the element's name surrounded by angle brackets, and the content in between:
        <element_name>...content...</element_name>

        There are some HTML elements that don't have a closing tag or any contents. These are called
        void elements. Void elements include <img>, <meta>, <link> and <input>.


        Element names can be thought of as descriptive keywords for the content they contain, such as
        video, audio, table, footer.

        A HTML page may consist of potentially hundreds of elements which are then read by a web
        browser, interpreted and rendered into human readable or audible content on the screen.


        For this document it is important to note the difference between elements and tags:

        Elements: video, audio, table, footer


        Tags: <video>, <audio>, <table>, <footer>, </html>, </body>






        Element insight




        Let's break down a tag...


        The <p> tag represents a common paragraph.

        Elements commonly have an opening tag and a closing tag. The opening tag contains the
        element's name in angle brackets (<p>). The closing tag is identical to the opening tag with the
        addition of a forward slash (/) between the opening bracket and the element's name (</p>).


        Content can then go between these two tags: <p>This is a simple paragraph.</p>.






        Creating a simple page




        The following HTML example creates a simple "Hello World" web page.

                                                                                                          [2]
        HTML files can be created using any text editor. The files must be saved with a .html or .htm
        extension in order to be recognized as HTML files.


        Once created, this file can be opened in any web browser.








        https://riptutorial.com/                                                                                3
   14   15   16   17   18   19   20   21   22   23   24