This practice is in continuation to HTML5 Basics–Practice 2. I will be writing the complete code here, but if you have already written the code from previous practices, you just need to add the extra code.
You must have noticed in the code from practice 2 that we had mentioned width and height for image element. These are called attributes of an element. It provides additional information to the element.These are written in the opening tag. And the format is Name=Value.
The following table shows the list of some commonly used attributes in HTML.
We have already mentioned href, src, width, height and alt in the code. We will be adding a few.
<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>
Output for tooltip:
Output for single quote: