Sunday, August 9, 2020

How to add Heading , Subheading and Paragraph in HTML



If you don't know how to run HTML code , then please see our previous blog link here:-How to start HTML


Example-1: How to add Heading and Subheading in HTML


Code:

<html>
   <body>

   <h1> This is main Heading </h1>

   <h2> This is sub Heading </h2>

   <h3> This is sub-sub Heading </h3>

   <h4> This is sub-sub-sub heading </h4>

   </body>
</html>

Result:

This is main Heading

This is sub Heading

This is sub-sub Heading

This is sub-sub-sub heading


Explanation:- 

  • As you can see in result when we use h1 then it print the large size font
  • When we use h2 then it print lower size font than h1.
  • When we use h3 then it print again lower size font than h2.  
  • Similarly, when we h4 then it print lower size font than h3.
  • Means if you increase number like h1,h2,h3 to h6 , then size of letter start reducing. So, It can be used to make heading and subheading.           


Example-2:- How to add Paragraph in HTML


Code:

<html>
  <body>
  <p> You see in website first of all a big heading and below it     there are some information about the heading in paragraph. To add    paragraph in the website use "<" --open tag, "p"--  paragraph,     ">" -- closing tag. You can use this tag below any heading for   adding paragraph. For close the paragraph   you should tell HTML   here my paragraph end. For this you use "<"   open tag, then "/"   forward slash, then use ">" close tag. Use of   forward slash (/)   tell ending of paragraph.
  </p>
  <body>
<html>

Result:

You see in website first of all a big heading and below it there are some information about the heading in paragraph. To add paragraph in the website use "<" --open tag, "p"-- paragraph, ">" -- closing tag. You can use this tag below any heading for adding paragraph. For close the paragraph you should tell HTML here my paragraph end. For this you use "<" open tag, then "/" forward slash, then use ">" close tag. Use of forward slash (/) tell ending of paragraph.



Explanation:- 

  • For add paragraph use <p> for starting of paragraph 
  • For end the paragraph use </p> (here we use forward slash(/) in front of p.


Example-3:- Combine heading and paragraph (Combine Example-1 &2 )



Code:

<html>
  <body>
  <h1> Hello this is my first HTML page. </h1>
  <p> Thankyou for reading my blog. First all we complete the basic     of HTML and then you apply these code for develop website. </p>

  <h2> Is HTML easy? </h2>
  <p> HTML is very easy you just remember code like you read in     previous example h1, h2, p like that, as we move forward there are    more code so remember all these code and these code much easy.</p>
  </body>
</html>

Result:-

Hello this is my first HTML page.

Thankyou for reading my blog. First all we complete the basic of HTML and then you apply these code for develop website.

Is HTML easy?

HTML is very easy you just remember code like you read in previous example h1, h2, p like that, as we move forward there are more code so remember all these code and these code much easy.



Explanation:- 

  • First we use <html> and then <body> then <h1> same as example-1. 
  • But in addition we use <p> below the heading to add the paragraph.
  • In this example we make two heading by <h1> for main heading and <h2> for subheading.
  • Below both heading we give some information like paragraph.
  • Finally close both html and body by use forward slash (/) like </html> and </body>

Hope you like this tutorial.

Thursday, July 9, 2020

How to start learn HTML


For learn HTML, you do not need external software like in case of python we download python IDLE, pycharm professional like software but here we don't need any software.


Step-1: Right click on the desktop and then select New and then text document.


Step-2: Then write in notepad:

<html>
<body>

Hello this is my first page.

</body>
</html>


Step-3: Now click on file and then click on save as.


Step-4: Now change the name whatever you want to give and in last of the name use ".html" and then click on Save as type and in this menu choose "all files" and then  save it.


Step-5: Now a file of same name appear on your desktop in the logo of chrome open it and you see "Hello this is my first page, which we write in between <body> and </body>.



Some key point:

1. Use <html> for open and </html> for closing. <html> show starting of html code.
(Here </html> use with forward slash which means closing)

2. Whatever you write in between <body> and </body> it seen in the browser.

3. Always we have to start a command and then close it. For close we use forward slash (/).


This is the basic about html page. In the next chapter we see more elements other than html, body and their use.

Hope you like and understand this tutorial.

How to add Heading , Subheading and Paragraph in HTML If you don't know how to run HTML code , then please see our previous blog link he...