Creating HTML document using Heading, Paragraph & Comment tag. - Technology & Web designing

Breaking

Saturday, 25 April 2020

Creating HTML document using Heading, Paragraph & Comment tag.

Heading Tag :

The <Hn> tag is used to specify heading in a document. Here, n is numbered from 1-6. So tags are : (H1, H2, H3, H4, H5, and H6). <H1> is a largest heading tag. While <H6> is a smallest heading tag. <H2> to <H5> defines middle level of heading. Align Attribute displays heading to the left/right/centre of a webpage.

Let us understand with an example.

Programe :

Output :

Paragraph Tag :

The <P> tag is used to indicate a paragraph in a document. It causes browser to insert a new line & additional verticle space to display the following <P> tag as a paragraph. Default left alignment.

It has three attributes :

  • ALIGN : It align paragraph text to left/right/centre.
  • STYLE : It specify style sheet properties to apply on content of paragraph.
  • WIDTH : It defines horizontal dimensions in terms of pixel.

Let us understand with an example

Program :

Output :

Comment Tag :

The <comment> tag can also be represented as <!---- ----->. The contens written within it are not displayed in the browser window.

E.g. <comment> text <comment>. The word 'text' is not displayed in the browser window.

No comments:

Post a Comment

If you have any doubts regarding this please comment or email us.