Web Development Tutorial | HTML5, Paragraph

hi guys welcome to another web development
development tutorial I am Joseph Bodnar this tutorial has the goal to teach you
about HTML paragraph element the paragraph element is used to wrap a text
in one or more paragraphs at the same time we can use the paragraph element to
organize or just to structure a text in one or more paragraphs I’m going to
create another file right-click select new file I’m going to name it paragraph dot the HTML enter I’m gonna go back to
this file heading dot HTML and I’m gonna to select the content of this file
and copy we CTRL + C and paste it inside this file paragraph dot HTML with
CTRL + V yeah okay so if you have a look over on the left side you will see
that all the text what is displayed on this webpage is appeared as it is
already formatted yeah and if you go back on the right side inside this
bracket editor you will notice that I haven’t used any paragraph element to
format a text and you might wondering why we need a paragraph element if the
text is already formatted a webpage without using paragraph
element so in order to understand why you have to use this HTML paragraph
element to wrap or to format your text I’m going to do the following example so
I’m going to use here the paragraph element using this open tag P and as
you notice the paragraph element has two tags a open tag and a closing tag I’m
going to copy actually to cut this text and paste it inside this paragraph
element yeah here you go and again here I’m going to use this paragraph element
and I’ve got to cut and paste the text here inside this paragraph element and
now you can see a difference the difference is that these two paragraph
now are obviously they are separated each of them are separate paragraph
organized and displayed on this web page yeah as you can see here is inserted a
blank space a empty space which was made by using these two paragraph element one
for this part of the text and another one here you know now you can realize
that here we have two different paragraphs if I remove the paragraph
element now this text comes together yeah and we
don’t have two different and separated the paragraphs as we have had before
yeah so this is the one thing what why you have to use this paragraph element
yeah I’m gonna to do again what I have done previously yeah let’s do three
paragraphs yeah so I’m going to do here another paragraph yeah good so cut and
again here cut now you can see I’ve got three paragraphs yeah so one another one
two and three this was done because I used three paragraph elements this is
the one the second and set so this is the first way to wrap paragraphs using
this paragraph elements on the other hand you should know that the closed tag
is optional to be used the browsers are quite tolerant with HTML yeah and
you are not bound to use for the paragraph element the close tag so let’s
remove it and let’s see what is going to happen as you can see these three paragraphs
remains the same formatted as before nothing is changed so again you are not
bound to use the close tag for the paragraph element but even that I
recommend you to use the close tag for a paragraph element because in this way
your code is much better organized and much better structured if you have a big
file a big HTML code if you have had use a close tag for a paragraph element you
will understand better your code when you go back to fix something or to
understand something inside your code in contrast if you would not use close tag
for the paragraph element I haven’t used it here and here and so on paragraph
element but in this way I don’t know what I have here yeah it could be
anything so it’s much better if I go not to use that the paragraph element even
all this text is going to be wrapped in one paragraph because in this way I can
understand better my code my HTML code and my HTML code will be much better
organized this is another thing why I recommend all the time that paragraph
element will be you I noticed in my practice that is used a
lot paragraph to insert a blank space empty space in this way using a
non-breaking space character and I’m gonna to copy this a few times and if
you look over here you can see on the website that was inserted empty spaces
between these two paragraphs because I used in this way the paragraph element
with this non breaking space character which is a entity characters
I wouldn’t recommend to use the paragraph element in this way to insert
blank spaces this is a wrong way to use paragraph element if you want to insert
blank spaces in your webpage you should handle this using CSS cascading style
sheet and not paragraph together with non breaking space character so I’m
gonna to room remove these so to resume the paragraph element is using an open
and closed tag is used to wrap, to organise and structure paragraphs one or
more paragraphs it’s recommended to use paragraph in order for the flow of your
code in order to organize and structure better your code in order to understand
better your code when you come later to fix the something’s inside the
HTML code on the other hand if you want to have one or more paragraphs inside
your webpage you have to use the paragraph element thanks for watching
this video tutorial I’m waiting you to watch my
other video tutorials maybe this web development series see you next time bye

Be the first to comment

Leave a Reply

Your email address will not be published.