HTML Paragraph Element: <p>
To create a paragraph, simply type in the <p> element with its opening and closing tags:
<!DOCTYPE html><html>
<head>
<title>first page</title>
</head>
<body>
<p>This is a paragraph. </p>
<p>This is another paragraph. </p>
</body>
</html>
Output :
Single Line Break Tag in HTML:
Use the <br /> tag to add a single line of text without starting a new paragraph:
<html>
<head>
<title>first page</title>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph. </p>
<p>This is <br /> a line break </p>
</body>
</html>
HTML Single Line Break:
Opening the HTML file in the browser shows that a single line break has been added to the paragraph:
The <br /> element has no end tag.
HTML <pre> Element :
The HTML <pre>
element defines preformatted text.
The text inside a <pre>
element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:
<html>
<head>
<title>first page</title>
</head>
<body>
<p>This is a paragraph. </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>
0 Comments
how I can help you?