HTML Quotations

There are two types of Quotataions to used in HTML

  1. Double quotation marks (")
  2. Single quotation marks (')

Generally used in many places in html like to enclose the values given to attributes.


Double quotation marks (")

Used to enclose between the attribute values in HTML tags with Double quotation marks ("). See the syntax of how Double quotation marks (") are used. Syntax:<tagname class="classname" id="idname" > Content </tagname>

Example
<!DOCTYPE html>
<html>
<head>
  <title>Quotation Example</title>
</head>
<body>
  <h1>Double Quotation Marks Example</h1>
  <a href="www.bmreducation.com">A link specified in href attribute with double quotes</a>
</body>
</html>

Single quotation marks (')

Used to enclose between the attribute values in HTML tags with Single quotation marks ('). See the syntax of how Single quotation marks (') are used. Syntax:<tagname class='classname' id='idname' > Content </tagname>

Example
<!DOCTYPE html>
<html>
<head>
  <title>Quotation Example</title>
</head>
<body>
  <h1>Single Quotation Marks Example</h1>
  <a href='www.bmreducation.com'>A link specified in href attribute with single quotes</a>
</body>
</html>

Quick Recap - Topics Covered

Single and double Quotations

Practice With Examples in Compilers

The Concepts and codes you leart practice in Compilers till you are confident of doing on your own. A Various methods of examples, concepts, codes availble in our websites. Don't know where to start Down some code examples are given for this page topic use the code and compile or Try on own Now


Example 1
Example 1 Example 2 Example 3 Example 4 Example 5


Quiz


FEEDBACK