{"id":63,"date":"2022-03-19T10:03:05","date_gmt":"2022-03-19T10:03:05","guid":{"rendered":"https:\/\/staging.brightwhiz.com\/?post_type=topic&p=63"},"modified":"2022-03-19T10:03:06","modified_gmt":"2022-03-19T10:03:06","slug":"html-paragraphs","status":"publish","type":"topic","link":"http:\/\/local.tutorials\/topic\/html-paragraphs\/","title":{"rendered":"HTML – Paragraphs"},"content":{"rendered":"\n
HTML paragraphs are what text is primarily formatted in. The HTML Example<\/p>\n\n\n\n HTML displays have a fluid display based on the numerous display sizes and aspect ratios. Unlike Word Processors, in HTML you cannot format text or content in general simply by adding any form of extra white space on your keyboard. The web browser will automatically remove any extra white spaces such as spaces and new-line characters when the page is displayed:<\/p>\n\n\n\n Example<\/p>\n\n\n\n The above paragraphs will display exactly the same in a web browser.<\/p>\n\n\n\n So how do we preserve formatting?<\/p>\n\n\n\n The HTML Example<\/p>\n\n\n\n The above code displays the same way in the browser as it does in the source code.<\/p>\n\n\n\n The HTML You should use Example<\/p>\n\n\n\n The HTML paragraphs are what text is primarily formatted in. The HTML <p> element is what you can use to define a paragraph. A paragraph will always start on a new line, and web browsers automatically add a white space margin before and after the paragraph. Example White Space in HTML HTML displays have a fluid […]<\/p>\n","protected":false},"featured_media":43,"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[2],"tags":[],"subject":[7,8],"yoast_head":"\n<p><\/code> element is what you can use to define a paragraph. A paragraph will always start on a new line, and web browsers automatically add a white space margin before and after the paragraph.<\/p>\n\n\n\n
<p>This is a paragraph.<\/p>\n<p>This is another paragraph.<\/p><\/code><\/pre>\n\n\n\n
White Space in HTML<\/h2>\n\n\n\n
<p>\nThis paragraph\nuses many lines\nin the source,\nbut looks\nokay in the \nweb browser since\nthe browser\nignores extra \nnew lines.\n<\/p>\n\n<p>\nThis paragraph contains\nquite a lot of \nextra spaces\nin the source code,\nbut the web browser\ndisplays ok since the \nbrowser ignores it.\n<\/p><\/code><\/pre>\n\n\n\n
Solution – The HTML
<pre><\/code> Tags<\/h2>\n\n\n\n
<pre><\/code> element can be used to define preformatted text. The text inside a
<pre><\/code> element is displayed in a fixed-width font (usually Courier) and also preserves spaces and line breaks.<\/p>\n\n\n\n
<pre>\nThis paragraph with pre\nuses many lines and spaces\nin the source,\nand will not look\nokay in the \nweb browser since\nthe browser\nnow preserves extra \nnew lines.\n<\/pre><\/code><\/pre>\n\n\n\n
HTML Line Breaks<\/h2>\n\n\n\n
<br><\/code> element is used to define a line break.<\/p>\n\n\n\n
<br><\/code> if you want to add a line break or new line without starting a new paragraph:<\/p>\n\n\n\n
<p>This is a paragraph with a <br>line breaks.<\/p><\/code><\/pre>\n\n\n\n
HTML Horizontal Rules<\/h2>\n\n\n\n
<hr><\/code> tag defines a thematic break in an HTML document and is typically displayed as a horizontal rule. It is an empty element therefore it has no closing tag. The
<hr><\/code> element is used to separate content in a web page:<\/p>\n\n\n\n
<h1>This is a heading<\/h1>\n<p>This is a paragraph.<\/p>\n<hr>\n<h2>This is another heading<\/h2>\n<p>This is another paragraph.<\/p>\n<hr><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"