HTML PARAGRAPHS
+3
Athena
jalilahb
Admin
7 posters
Page 1 of 1
HTML PARAGRAPHS
The HTML <p> element defines a paragraph:
Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Note: Browsers automatically add some white space (a margin) before and after a paragraph.
HTML Display
You cannot be sure how HTML will be displayed.
Large or small screens, and resized windows will create different results.
With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.
The browser will remove any extra spaces and extra lines when the page is displayed:
Example
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>
<p>
This paragraph
contains a lot of spaces
in the source code,
but the browser
ignores it.
</p>
Don't Forget the End Tag
Most browsers will display HTML correctly even if you forget the end tag:
Example
<p>This is a paragraph.
<p>This is another paragraph.
The example above will work in most browsers, but do not rely on it.
Note: Dropping the end tag can produce unexpected results or errors.
HTML Line Breaks
The HTML
element defines a line break.
Use <br> if you want a line break (a new line) without starting a new paragraph:
<p>This is<br>a paragraph<br>with line breaks.</p>
The <br> tag is an empty tag, which means that it has no end tag.
For clarifications feel free to leave your comment below.
Example
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Note: Browsers automatically add some white space (a margin) before and after a paragraph.
HTML Display
You cannot be sure how HTML will be displayed.
Large or small screens, and resized windows will create different results.
With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.
The browser will remove any extra spaces and extra lines when the page is displayed:
Example
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>
<p>
This paragraph
contains a lot of spaces
in the source code,
but the browser
ignores it.
</p>
Don't Forget the End Tag
Most browsers will display HTML correctly even if you forget the end tag:
Example
<p>This is a paragraph.
<p>This is another paragraph.
The example above will work in most browsers, but do not rely on it.
Note: Dropping the end tag can produce unexpected results or errors.
HTML Line Breaks
The HTML
element defines a line break.
Use <br> if you want a line break (a new line) without starting a new paragraph:
<p>This is<br>a paragraph<br>with line breaks.</p>
The <br> tag is an empty tag, which means that it has no end tag.
For clarifications feel free to leave your comment below.
Re: HTML PARAGRAPHS
Hi Ma'am Junaimah Thank you for this information Now I know how to use HTML paragraph.
But I have a question ma'am What if I would like to display a stanza of a poem for example; what element I will use?
But I have a question ma'am What if I would like to display a stanza of a poem for example; what element I will use?
jalilahb- Master
- Posts : 7
Join date : 2017-10-15
Re: HTML PARAGRAPHS
Thank you for the information mam junaimah. now i know how to use a paragraph
wenggay- Guest
Re: HTML PARAGRAPHS
jalilahb wrote:Hi Ma'am Junaimah Thank you for this information Now I know how to use HTML paragraph.
But I have a question ma'am What if I would like to display a stanza of a poem for example; what element I will use?
Thank you jalilahb This is the answer to your question.
You can use the HTML <pre> element. The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:
Example code:
<!DOCTYPE html>
<html>
<body>
<p>The pre tag preserves both spaces and line breaks:</p>
<pre>
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
My Bonnie lies over the ocean.
Oh, bring back my Bonnie to me.
</pre>
</body>
</html>
Re: HTML PARAGRAPHS
wenggay wrote:Thank you for the information mam junaimah. now i know how to use a paragraph
Thank you wenggay for visiting Welcome to my forum hehehe
Re: HTML PARAGRAPHS
Yey it works ma'am I used the <pre> element
jalilahb- Master
- Posts : 7
Join date : 2017-10-15
Re: HTML PARAGRAPHS
The instructions are easy to understand, thankyou ma'am I tried it in notepad ++ and it worked
Athena- Posts : 1
Join date : 2017-10-15
Re: HTML PARAGRAPHS
Athena wrote:The instructions are easy to understand, thankyou ma'am I tried it in notepad ++ and it worked
Welcome Athena You can check and visit another category the CSS and JavaScript If you want
Re: HTML PARAGRAPHS
Well, yes i have tried using HTML paragraphs in a program. It's so important especially if you are to insert a lot of texts. Is there any way you can make your paragraphs more appealing?
JuliaB- Veteran
- Posts : 4
Join date : 2017-10-16
Re: HTML PARAGRAPHS
hi Maam junaimah .. thank you for this information.. i can use it in my web page design
janella- Member
- Posts : 3
Join date : 2017-10-16
Re: HTML PARAGRAPHS
Admin wrote:jalilahb wrote:Yey it works ma'am I used the <pre> element
Welcome jalilahb
The same question with you jalilahb, now I know the use of <pre> element
Lolita01- Master
- Posts : 7
Join date : 2017-10-16
Re: HTML PARAGRAPHS
Athena wrote:The instructions are easy to understand, thankyou ma'am I tried it in notepad ++ and it worked
I agreed with you athena because of this post I understand very well the use of HTML paragraphs Thank you again ma'am Junai
Lolita01- Master
- Posts : 7
Join date : 2017-10-16
Re: HTML PARAGRAPHS
JuliaB wrote:Well, yes i have tried using HTML paragraphs in a program. It's so important especially if you are to insert a lot of texts. Is there any way you can make your paragraphs more appealing?
Yes, JuliaB because you can set the color and font of your text in the paragraph using CSS Font and Text
Is anyone here knows already how to use it ?
Re: HTML PARAGRAPHS
janella wrote:hi Maam junaimah .. thank you for this information.. i can use it in my web page design
welcome janella you can try also the different CSS text and font property in making your paragrah in your web page
Re: HTML PARAGRAPHS
Admin wrote:JuliaB wrote:Well, yes i have tried using HTML paragraphs in a program. It's so important especially if you are to insert a lot of texts. Is there any way you can make your paragraphs more appealing?
Yes, JuliaB because you can set the color and font of your text in the paragraph using CSS Font and Text
Is anyone here knows already how to use it ?
Really? Glad to know. Because it's much appealing if the content were colorful and alike. Thanks for the info,admin!
JuliaB- Veteran
- Posts : 4
Join date : 2017-10-16
Re: HTML PARAGRAPHS
Rtagudin wrote:How do you skip a line in html?
To skip a line in HTML, use <p> , which stands for 'Paragraph'. There are two ways to go about using p . You can just put it at the end of a paragraph to skip a line on to the next; or you can put a <p> at the start of the paragraph and a </p> at the end.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|