This is in continuation to HTML5 Basics–Practice 3. The method will remain same. Codes will be same with addition of new statements. If you have any queries, feel free to comment.
If you want to get the source code of web pages, just right click and select view source.
Sometimes you might want to put a line between contents. For this we can use the Horizontal Rules . It is represented by the <hr> tag. Also, in HTML5 Basics–Practice 1, we had mentioned about blank spaces in paragraph. We will show it in the following code.
<h1>First Page Heading 1</h1>
<p title=”Tooltip for first paragraph”>Paragraph 1</p>
<h2>First Page Heading 2</h2>
<h3>First Page Heading 3</h3>
<h4>First Page Heading 4</h4>
<h5>First Page Heading 5</h5>
<h6>First Page Heading 6</h6>
<a href=”https://www.workeatpraylove.com”>Click on this to see my website!!</a>
<img src= “IMG_0032.jpg” alt=”alternate text for image” width=”104″ height=”142″>
<p title=’example when single quotes to be used: “Spriha” wrote it’>Hover mouse here for single quote usage</p>
<h1>Extra space in paragraph element</h1>
<p>This is the first line
This is the second line
This is the third line</p>
Out put for <hr> tag:
Output for white space:
This is also referred to as the poem problem. A poem includes short lines that come one after the other. To include break after each line can be a tedious task. To overcome this, we have the <pre> tag. It prints the output the way it is written,i.e, including the white spaces. To implement the same, just replace the tag <p> with <pre>. Do not forget to close this tag.