Page 42 - modular_v2.0_HTML&_CSS_Fb
P. 42

</BODY>

                  </HTML>






















                                                              Using margins

                     HEIGHT AND WIDTH PROPERTIES

                  The height and width properties enables to set the height and width of an element. It is also used
                  to set the height and width of the area inside the border, margin, etc. of the element.

                  The height and width can be specified in length whose values can be in 'px', 'cm', percent, (%),
                  etc. Also, we can specify height in 'vh' and width in 'vw'. of the containing block.
                  Syntax:

                  HEIGHT: VALUE;
                  WIDTH: VALUE;
                  Let us create a web page to change the height and width of a box.
                  <!DOCTYPE HTML>
                  <HTML>

                  <HEAD>
                  <TITLE>CSS Height and Width</TITLE>
                  </HEAD>
                  <BODY>
                  <P STYLE="HEIGHT: 100PX;WIDTH: 200PX;BACKGROUND-COLOR: PINK;">
                  THIS ELEMENT HAS A HEIGHT OF 100PX AND A WIDTH OF 200PX.</P>

                  </BODY>
                  </HTML>












                                                        Changing height and width
                   40
                          Touchpad MODULAR (Ver. 2.0)
   37   38   39   40   41   42   43   44   45   46   47