Saturday, July 25, 2015

18. HTML Blocks

 HTML Tutorial

All the HTML elements can be categorized into two categories (a) Block Level Elements (b) Inline Elements

Block Elements

Block elements appear on the screen as if they have a line break before and after them. For example the ,

,

,

,

,

,
,
    ,
      ,
      ,
      , 
      ,
      , and
      elements are all block level elements. They all start on their own new line, and anything that follows them appears on its own new line.

Inline Elements

Inline elements, on the other hand, can appear within sentences and do not have to appear on a new line of their own. The , , , , , , , , ,
  • , , , , , , , and elements are all inline elements.

  • Grouping HTML Elements

    There are two important tags which we use very frequently to group various other HTML tags (i)
    tag and (ii) tag

    The
    tag

    This is the very important block level tag which plays a big role in grouping various other HTML tags and applying CSS on group of elements. Even now
    tag can be used to create webpage layout where we define different parts ( Left, Right, Top etc) of the page using
    tag. This tag does not provide any visual change on the block but this has more meaning when it is used with CSS.

    Example

    Following is a simple example of
    tag. We will learn Cascading Style Sheet (CSS) in a separate chapter but we used it here to show the usage of
    tag:

    
    
    HTML div Tag
    
    
    
    <!-- First group of tags 
    

    This is first group

    Following is a list of vegetables
    • Beetroot
    • Ginger
    • Potato
    • Radish

    This is second group

    Following is a list of fruits
    • Apple
    • Banana
    • Mango
    • Strawberry
    --> This will produce following result:

    This is first group

    Following is a list of vegetables
    • Beetroot
    • Ginger
    • Potato
    • Radish

    This is second group

    Following is a list of fruits
    • Apple
    • Banana
    • Mango
    • Strawberry

    The tag

    The HTML is an inline element and it can be used to group inline-elements in an HTML document. This tag also does not provide any visual change on the block but has more meaning when it is used with CSS.
    The difference between the tag and the
    tag is that the tag is used with inline elements where as the
    tag is used with block-level elements.

    Example

    Following is a simple example of tag. We will learn Cascading Style Sheet (CSS) in a separate chapter but we used it here to show the usage of tag:
    
    
    HTML span Tag
    
    
    
    This is red and this is green
    
    
    
    
    
    

    0 comments:

    Post a Comment

     
    Designed by Kakada Akkarak Surakkiat
    Technology: របៀប​ដំឡើង Windows 10 នៅ​លើ​កុំព្យូទ័រ!: អ្នកត្រូវដឹងឲ្យ ច្បាស់ពី Windows ដែលអ្នកយក ទៅដំឡើង ដោយសារមាន Windows ខ្លះមានការ crack រួច ឬខ្លះត្រូវការ Product key ភ្លាម និងខ្លះទៀត អាចត្រូវ skip កន្លែងវាយលេខ Product key បាន តែត្រូវ Activate តាមក្រោយ ទើបប្រើប្រាស់បាន។ Technology: ដំណោះ​ស្រាយ Error 80240020 នៅ​ពេល​តម្លើង Windows 10 Free តាម​រយៈ​ការ Upgrade : មាន បញ្ហាមួយចំនួន ទាក់ទងនឹង ការតម្លើង Windows 10 នេះផងដែរ ប៉ុន្តែបញ្ហានោះ កើតឡើង ទៅលើតែកុំព្យូទ័រ មួយចំនួនប៉ុណ្ណោះ គឺខណៈពេល ដែលអ្នក ប្រើប្រាស់ បានទាញយក Windows 10 ចប់ហើយ វាបាន បង្ហាញនូវ ផ្ទាំង error មួយ ដែលមានលេខ សំគាល់ error នោះគឺ 80240020។ ដូចនេះដើម្បី ដោះស្រាយ នូវបញ្ហា មួយនេះ សូមលោកអ្នក តាមដានអាន ជាមួយយើងខ្ញុំ ទាំងអស់គ្នា !!