{"id":81,"date":"2018-04-10T16:20:30","date_gmt":"2018-04-10T16:20:30","guid":{"rendered":"https:\/\/people.utm.my\/emilysff\/?p=81"},"modified":"2018-12-31T07:29:33","modified_gmt":"2018-12-31T07:29:33","slug":"html-paragraphs","status":"publish","type":"post","link":"https:\/\/people.utm.my\/emilysff\/2018\/04\/10\/html-paragraphs\/","title":{"rendered":"HTML Paragraphs"},"content":{"rendered":"<h2>HTML Paragraphs<\/h2>\n<p>The HTML\u00a0<code class=\"w3-codespan\">&lt;p&gt;<\/code>\u00a0element defines a\u00a0<strong>paragraph<\/strong>:<\/p>\n<p><em>Example :<\/em><\/p>\n<blockquote><p>&lt;html&gt;<br \/>\n&lt;body&gt;<\/p>\n<p>&lt;p&gt;This is a paragraph.&lt;\/p&gt;<br \/>\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;<br \/>\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p><em>Output:<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-85\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-11-300x152.jpg\" alt=\"\" width=\"300\" height=\"152\" srcset=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-11-300x152.jpg 300w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-11.jpg 414w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>HTML Display<\/h2>\n<p>You cannot be sure how HTML will be displayed.<\/p>\n<p>Large or small screens, and resized windows will create different results.<\/p>\n<p>With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.<\/p>\n<p>The browser will remove any extra spaces and extra lines when the page is displayed:<\/p>\n<p><em>Example:<\/em><\/p>\n<blockquote><p>&lt;html&gt;<br \/>\n&lt;body&gt;<\/p>\n<p>&lt;p&gt;<br \/>\nThis paragraph<br \/>\ncontains a lot of lines<br \/>\nin the source code,<br \/>\nbut the browser<br \/>\nignores it.<br \/>\n&lt;\/p&gt;<\/p>\n<p>&lt;p&gt;<br \/>\nThis paragraph<br \/>\ncontains a lot of spaces<br \/>\nin the source code,<br \/>\nbut the browser<br \/>\nignores it.<br \/>\n&lt;\/p&gt;<\/p>\n<p>&lt;p&gt;<br \/>\nThe number of lines in a paragraph depends on the size of the browser window. If you resize the browser window, the number of lines in this paragraph will change.<br \/>\n&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p><em>Output:<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-84 size-full\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-10.jpg\" alt=\"\" width=\"1101\" height=\"310\" srcset=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-10.jpg 1101w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-10-300x84.jpg 300w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-10-768x216.jpg 768w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-10-1024x288.jpg 1024w\" sizes=\"(max-width: 1101px) 100vw, 1101px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>HTML Line Breaks<\/h2>\n<p>The HTML\u00a0<code class=\"w3-codespan\">&lt;br&gt;<\/code>\u00a0element defines a\u00a0<strong>line break<\/strong>.<\/p>\n<p>Use\u00a0<code class=\"w3-codespan\">&lt;br&gt;<\/code>\u00a0if you want a line break (a new line) without starting a new paragraph:<\/p>\n<p>Example:<\/p>\n<blockquote><p>&lt;html&gt;<br \/>\n&lt;body&gt;<\/p>\n<p>&lt;p&gt;This is&lt;br&gt;a paragraph&lt;br&gt;with line breaks&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-83\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-9-300x133.jpg\" alt=\"\" width=\"300\" height=\"133\" srcset=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-9-300x133.jpg 300w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-9.jpg 499w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>The HTML &lt;pre&gt; Element<\/h2>\n<p>The HTML\u00a0<code class=\"w3-codespan\">&lt;pre&gt;<\/code>\u00a0element defines preformatted text.<\/p>\n<p>The text inside a\u00a0<code class=\"w3-codespan\">&lt;pre&gt;<\/code>\u00a0element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:<\/p>\n<p><em>Example:<\/em><\/p>\n<blockquote><p>&lt;html&gt;<br \/>\n&lt;body&gt;<\/p>\n<p>&lt;p&gt;The pre tag preserves both spaces and line breaks:&lt;\/p&gt;<\/p>\n<p>&lt;pre&gt;<br \/>\nMy Bonnie lies over the ocean.<\/p>\n<p>My Bonnie lies over the sea.<\/p>\n<p>My Bonnie lies over the ocean.<\/p>\n<p>Oh, bring back my Bonnie to me.<br \/>\n&lt;\/pre&gt;<\/p>\n<p>&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p><em>Output:<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-82\" src=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-8-300x194.jpg\" alt=\"\" width=\"300\" height=\"194\" srcset=\"https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-8-300x194.jpg 300w, https:\/\/people.utm.my\/emilysff\/wp-content\/uploads\/sites\/1028\/2018\/12\/Capture-8.jpg 447w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML Paragraphs The HTML\u00a0&lt;p&gt;\u00a0element defines a\u00a0paragraph: Example : &lt;html&gt; &lt;body&gt; &lt;p&gt;This is a paragraph.&lt;\/p&gt; &lt;p&gt;This is a paragraph.&lt;\/p&gt; &lt;p&gt;This is a paragraph.&lt;\/p&gt; &lt;\/body&gt; &lt;\/html&gt; Output: &nbsp; 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 [&hellip;]<\/p>\n","protected":false},"author":14432,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4],"tags":[17,16],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-it","tag-html","tag-itknowledge"],"_links":{"self":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/users\/14432"}],"replies":[{"embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":0,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"wp:attachment":[{"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/people.utm.my\/emilysff\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}