Learn Basic HTML Complete Course part 8

1 min read

HTML Paragraph

HTML paragraph or HTML p tag is used to define a paragraph in a webpage. Let's take a simple example to see how it work. It is a notable point that a browser itself add an empty line before and after a paragraph. An HTML <p> tag indicates starting of new paragraph.

If we are using various tags in one HTML file then browser automatically adds a single blank line between the two paragraphs.


Space inside HTML Paragraph

If you put a lot of spaces inside the HTML p tag, browser removes extra spaces and extra line while displaying the page. The browser counts number of spaces and lines as a single one.

Let’s take an example 

<!doctype html>
<html>
    <head>
    </head>

    <body>
    <p> 
    I am 
    going to provide 
    you a tutorial on HTML[By TopBlog Pk] 
    and hope that it will 
    be very beneficial for you. 
    </p> 

    <p> 
    Look, I put here a lot 
    of spaces         but          I know, Browser will ignore it. 
    </p> 

    <p>You cannot determine the display of HTML</p> 

    <p>because resized windows may create different result.</p> 
    </body>
</html>

output:

I am going to provide you a tutorial on HTML[By TopBlog Pk] and hope that it will be very beneficial for you.

Look, I put here a lot of spaces but I know, Browser will ignore it.

You cannot determine the display of HTML

because resized windows may create different result.


As you can see, all the extra lines and unnecessary spaces are removed by the browser.



You may like these posts

  • HTML ResponsiveResponsive web design is used to make your web page look appropriate, good, and well placedon all devices (desktop, tablet, smartphone etc.)Responsive web design use…
  • HTML ListsHTML Lists are used to specify lists of information. All lists may contain one or more list elements. There are three different types of HTML lists:Ordered List or N…
  • Hi Web Developers! this time the design teacher will share a tutorial how to make a page profile card plus curriculum vitae the simple one is pleasing to the eye, of course not bo…
  • HTML HeadingA HTML heading or HTML h tag can be defined as a title or a subtitle which you want to display on the webpage. When you place the text within the heading tags <h1>…
  • HTML File PathsAn HTML file fileName is used to describe the location of a file in a website folder. File paths are like an address of file for a web browser. We can link any exter…
  • HTML CommentsComments are some text or code written in your code to give an explanation about the code, and not visible to the user. Comments which are used for HTML file are known…

Post a Comment