In this practice we will use a new html file. I am naming it eg3.html. We will learn additional tags today. We will also discuss about how we can put our comments in html. Placing comments in html is different than in java or C++.
Comments in html document should be placed between <!– –>. There is no closing tag required for this. You can also use this to comment in multiple lines. We can also put conditional comments which will be executed only if it passes the condition. We will show these in the code.
We used color in HTML5 Basics–Practice 6. We can add color in different forms in html. We can use the color name, RGB value or HEX value. The color names can be red, orange, yellow, cyan, and so on. There are around 140 standard color names that are supported in html. Color can also be specified using RGB(red, green, blue). Try using different combinations for different colors. Try and see what happens if you place same values for red, green and blue. We can also use HEX values for different colors in #RRGGBB form. FF is the highest value and 00 is the lowest(0—255).
<p>For short quotations,<q>such as in a single line</q> we can use this.</p>
<p>For multiple sentences, or quotes from other sites, we can use this. <blockquote cite=”www.workeatpraylove.com”>Rumors are carried by haters, spread by fools and accepted by idiots. This is generally indented. Here cite is being used as an attribute.</blockquote></p>
<!–using this comment here–>
<p>I want to become the <abbr title=”Chief Executive Officer”>CEO</abbr> of a company one day.</p>
<p><cite>A book on Cite</cite>: Here we have used cite tag.</p>
<!–we will talk on colors now–>
<p style=”background-color:orange;color:blue;”>Background is orange and text is blue.</p>
<p style=”background-color:rgb(0,188,158);color:blue;”>Background is turqoise and text is blue.</p>
<p style=”background-color:#00FF00;color:#FF0000;”>Background is green and text is red.</p>