{
  "intro": {
    "title": "HTML Introduction",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML is the standard markup language for creating Web pages."
      },
      {
        "type": "header",
        "level": 2,
        "text": "What is HTML?"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "HTML stands for Hyper Text Markup Language",
          "HTML is the standard markup language for creating Web pages",
          "HTML describes the structure of a Web page",
          "HTML consists of a series of elements",
          "HTML elements tell the browser how to display the content",
          "HTML elements label pieces of content such as \"this is a heading\", \"this \n  is a paragraph\", \"this is a link\", etc."
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "A Simple HTML Document"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>\n<html><head><title>Page Title</title>\n </head>\n<body><h1>My First Heading</h1><p>My first paragraph.</p>\n    </body></html>"
      },
      {
        "type": "header",
        "level": 3,
        "text": "Example Explained"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "The <code class=\"w3-codespan\">&lt;!DOCTYPE html&gt;</code> declaration defines \nthat this document is an HTML5 document",
          "The <code class=\"w3-codespan\">&lt;html&gt;</code> element is the root element of an HTML \npage",
          "The <code class=\"w3-codespan\">&lt;head&gt;</code> element contains meta information about the \n HTML page",
          "The <code class=\"w3-codespan\">&lt;title&gt;</code> element specifies a title for the \n HTML page (which is shown in the browser's title bar or in the page's tab)",
          "The <code class=\"w3-codespan\">&lt;body&gt;</code> element defines the \n document's body, and is a container for all the visible contents, such as \n headings, paragraphs, images, hyperlinks, tables, lists, etc.",
          "The <code class=\"w3-codespan\">&lt;h1&gt;</code> element defines a large heading",
          "The <code class=\"w3-codespan\">&lt;p&gt;</code> element defines a paragraph"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "What is an HTML Element?"
      },
      {
        "type": "paragraph",
        "text": "An HTML element is defined by a start tag, some content, and an end tag:"
      },
      {
        "type": "paragraph",
        "text": "The HTML <strong>element</strong> is everything from the start tag to the end tag:"
      },
      {
        "type": "table",
        "headers": [
          "Start tag",
          "Element content",
          "End tag"
        ],
        "rows": [
          [
            "&lt;h1&gt;",
            "My First Heading",
            "&lt;/h1&gt;"
          ],
          [
            "&lt;p&gt;",
            "My first paragraph.",
            "&lt;/p&gt;"
          ],
          [
            "&lt;br&gt;",
            "<em>none</em>",
            "<em>none</em>"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Some HTML elements have no content (like the &lt;br&gt; \nelement). These elements are called empty elements. Empty elements do not have an end tag!</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Web Browsers"
      },
      {
        "type": "paragraph",
        "text": "The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them \ncorrectly."
      },
      {
        "type": "paragraph",
        "text": "A browser does not display the HTML tags, but uses them to determine how to display the document:"
      },
      {
        "type": "paragraph",
        "text": "<img alt=\"View in Browser\" src=\"img_chrome.png\" class=\"w3-image\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Page Structure"
      },
      {
        "type": "paragraph",
        "text": "Below is a visualization of an HTML page structure:"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> The content inside the &lt;body&gt; section \nwill be displayed in a browser. The content inside the &lt;title&gt; element will be \nshown in the browser's title bar or in the page's tab.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML History"
      },
      {
        "type": "paragraph",
        "text": "Since the early days of the World Wide Web, there have been many versions of HTML:"
      },
      {
        "type": "table",
        "headers": [
          "Year",
          "Version"
        ],
        "rows": [
          [
            "1989",
            "Tim Berners-Lee invented www"
          ],
          [
            "1991",
            "Tim Berners-Lee invented HTML"
          ],
          [
            "1993",
            "Dave Raggett drafted HTML+"
          ],
          [
            "1995",
            "HTML Working Group defined HTML 2.0"
          ],
          [
            "1997",
            "W3C Recommendation: HTML 3.2"
          ],
          [
            "1999",
            "W3C Recommendation: HTML 4.01"
          ],
          [
            "2000",
            "W3C Recommendation: XHTML 1.0"
          ],
          [
            "2008",
            "WHATWG HTML5 First Public Draft"
          ],
          [
            "2012",
            "<a href=\"http://whatwg.org/html/\" target=\"_blank\">WHATWG HTML5 Living Standard</a>"
          ],
          [
            "2014",
            "<a href=\"http://www.w3.org/TR/html5/\" target=\"_blank\">W3C Recommendation: HTML5</a>"
          ],
          [
            "2016",
            "W3C Candidate Recommendation: HTML 5.1"
          ],
          [
            "2017",
            "<a href=\"http://www.w3.org/TR/html51/\" target=\"_blank\">W3C Recommendation: HTML5.1 2nd Edition</a>"
          ],
          [
            "2017",
            "<a href=\"http://www.w3.org/TR/html52/\" target=\"_blank\">W3C Recommendation: HTML5.2</a>"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>This tutorial follows the latest HTML5 standard.</p>"
      }
    ]
  },
  "basic": {
    "title": "HTML Basic Examples",
    "blocks": [
      {
        "type": "intro",
        "text": "In this chapter we will show some basic HTML examples."
      },
      {
        "type": "intro",
        "text": "Don't worry if we use tags you have not learned about yet."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Documents"
      },
      {
        "type": "paragraph",
        "text": "All HTML documents must start with a document type declaration: <code class=\"w3-codespan\">&lt;!DOCTYPE html&gt;</code>."
      },
      {
        "type": "paragraph",
        "text": "The HTML document itself begins with <code class=\"w3-codespan\">&lt;html&gt;</code> and ends with <code class=\"w3-codespan\">&lt;/html&gt;</code>."
      },
      {
        "type": "paragraph",
        "text": "The visible part of the HTML document is between <code class=\"w3-codespan\">&lt;body&gt;</code> and <code class=\"w3-codespan\">&lt;/body&gt;</code>."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <!DOCTYPE> Declaration"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;!DOCTYPE&gt;</code> declaration represents the document type, and helps browsers to display web pages correctly."
      },
      {
        "type": "paragraph",
        "text": "It must only appear once, at the top of the page (before any HTML tags)."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;!DOCTYPE&gt;</code> declaration is not case sensitive."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;!DOCTYPE&gt;</code> declaration for HTML5 is:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Headings"
      },
      {
        "type": "paragraph",
        "text": "HTML headings are defined with the <code class=\"w3-codespan\">&lt;h1&gt;</code> to <code class=\"w3-codespan\">&lt;h6&gt;</code> tags."
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;h1&gt;</code> defines the most important heading. <code class=\"w3-codespan\">&lt;h6&gt;</code> defines the least important \nheading:&nbsp;"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1>This is heading 1</h1>\n<h2>This is heading 2</h2>\n<h3>This is heading 3</h3>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Paragraphs"
      },
      {
        "type": "paragraph",
        "text": "HTML paragraphs are defined with the <code class=\"w3-codespan\">&lt;p&gt;</code> tag:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This is a paragraph.</p>\n<p>This is another paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Links"
      },
      {
        "type": "paragraph",
        "text": "HTML links are defined with the <code class=\"w3-codespan\">&lt;a&gt;</code> tag:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"https://www.codingtamilan.com\">This is a link</a>"
      },
      {
        "type": "paragraph",
        "text": "The link's destination is specified in the <code class=\"w3-codespan\">href</code> attribute.&nbsp;"
      },
      {
        "type": "paragraph",
        "text": "Attributes are used to provide additional information about HTML elements."
      },
      {
        "type": "paragraph",
        "text": "You will learn more about attributes in a later chapter."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Images"
      },
      {
        "type": "paragraph",
        "text": "HTML images are defined with the <code class=\"w3-codespan\">&lt;img&gt;</code> tag."
      },
      {
        "type": "paragraph",
        "text": "The source file (<code class=\"w3-codespan\">src</code>), alternative text (<code class=\"w3-codespan\">alt</code>), \n<code class=\"w3-codespan\">width</code>, and <code class=\"w3-codespan\">height</code> are provided as attributes:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"codingtamilan.jpg\" alt=\"Coding Tamilan\" width=\"104\" height=\"142\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "How to View HTML Source"
      },
      {
        "type": "paragraph",
        "text": "Have you ever seen a Web page and wondered \"Hey! How did they do that?\""
      },
      {
        "type": "header",
        "level": 3,
        "text": "View HTML Source Code:"
      },
      {
        "type": "paragraph",
        "text": "Click CTRL + U in an HTML page, or right-click on the page and select \"View Page Source\". This will open a \nnew tab \ncontaining the HTML source code of the page."
      },
      {
        "type": "header",
        "level": 3,
        "text": "Inspect an HTML Element:"
      },
      {
        "type": "paragraph",
        "text": "Right-click on an element (or a blank area), and choose \"Inspect\" to see what elements are made up of (you will see both \nthe HTML and the CSS). You can also edit the HTML or CSS on-the-fly in the \nElements or Styles panel that opens."
      }
    ]
  },
  "elements": {
    "title": "HTML Elements",
    "blocks": [
      {
        "type": "intro",
        "text": "An HTML element is defined by a start tag, some content, and an \nend tag."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Elements"
      },
      {
        "type": "paragraph",
        "text": "The HTML <strong>element</strong> is everything from the start tag to the end tag:"
      },
      {
        "type": "paragraph",
        "text": "Examples of some HTML elements:"
      },
      {
        "type": "table",
        "headers": [
          "Start tag",
          "Element content",
          "End tag"
        ],
        "rows": [
          [
            "&lt;h1&gt;",
            "My First Heading",
            "&lt;/h1&gt;"
          ],
          [
            "&lt;p&gt;",
            "My first paragraph.",
            "&lt;/p&gt;"
          ],
          [
            "&lt;br&gt;",
            "<em>none</em>",
            "<em>none</em>"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Some HTML elements have no content (like the &lt;br&gt; \nelement). These elements are called empty elements. Empty elements do not have an end tag!</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Nested HTML Elements"
      },
      {
        "type": "paragraph",
        "text": "HTML elements can be nested (this means that elements can contain other elements)."
      },
      {
        "type": "paragraph",
        "text": "All HTML documents consist of nested HTML elements."
      },
      {
        "type": "paragraph",
        "text": "The following example contains four HTML elements (<code class=\"w3-codespan\">&lt;html&gt;</code>, <code class=\"w3-codespan\">&lt;body&gt;</code>, <code class=\"w3-codespan\">&lt;h1&gt;</code> \nand <code class=\"w3-codespan\">&lt;p&gt;</code>):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>\n<html><body>\n <h1>My First Heading</h1><p>My first paragraph.</p>\n</body></html>"
      },
      {
        "type": "header",
        "level": 3,
        "text": "Example Explained"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;html&gt;</code> element is the root element \nand it defines the whole HTML document."
      },
      {
        "type": "paragraph",
        "text": "It has a start tag <code class=\"w3-codespan\">&lt;html&gt;</code> and an end tag <code class=\"w3-codespan\">&lt;/html&gt;</code>."
      },
      {
        "type": "paragraph",
        "text": "Then, inside the <code class=\"w3-codespan\">&lt;html&gt;</code> element there is \na <code class=\"w3-codespan\">&lt;body&gt;</code> \nelement:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<body>\n <h1>My First Heading</h1><p>My first paragraph.</p>\n</body>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;body&gt;</code> element defines the \ndocument's body."
      },
      {
        "type": "paragraph",
        "text": "It has a start tag <code class=\"w3-codespan\">&lt;body&gt;</code> and an end tag <code class=\"w3-codespan\">&lt;/body&gt;</code>."
      },
      {
        "type": "paragraph",
        "text": "Then, inside the <code class=\"w3-codespan\">&lt;body&gt;</code> element there \nare two other elements:\n<code class=\"w3-codespan\">&lt;h1&gt;</code> and <code class=\"w3-codespan\">\n&lt;p&gt;</code>:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1>My First Heading</h1><p>My first paragraph.</p>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;h1&gt;</code> element defines a heading."
      },
      {
        "type": "paragraph",
        "text": "It has a start tag <code class=\"w3-codespan\">&lt;h1&gt;</code> and an end tag <code class=\"w3-codespan\">&lt;/h1&gt;</code>:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1>My First Heading</h1>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;p&gt;</code> element defines a paragraph."
      },
      {
        "type": "paragraph",
        "text": "It has a start tag <code class=\"w3-codespan\">&lt;p&gt;</code> and an end tag <code class=\"w3-codespan\">&lt;/p&gt;</code>:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>My first paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Never Skip the End Tag"
      },
      {
        "type": "paragraph",
        "text": "Some HTML elements will display correctly, even if you forget the end tag:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<html><body>\n <p>This is a paragraph\n <p>This is a paragraph\n</body></html>"
      },
      {
        "type": "paragraph",
        "text": "<strong>However, never rely on this! Unexpected results and errors may occur if you forget the end tag!</strong>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Empty HTML Elements"
      },
      {
        "type": "paragraph",
        "text": "HTML elements with no content are called empty elements."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;br&gt;</code> tag defines a line break, and \nis an empty element without a closing tag:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This is a <br> paragraph with a line break.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML is Not Case Sensitive"
      },
      {
        "type": "paragraph",
        "text": "HTML tags are not case sensitive: <code class=\"w3-codespan\">&lt;P&gt;</code> means the same as <code class=\"w3-codespan\">&lt;p&gt;</code>."
      },
      {
        "type": "paragraph",
        "text": "The HTML standard does not require lowercase tags, but W3C\n<b>recommends</b> lowercase in HTML, and <b>demands</b> lowercase for stricter document types like XHTML."
      },
      {
        "type": "note",
        "text": "<p>At Coding Tamilan we always use lowercase tag names.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Tag Reference"
      },
      {
        "type": "paragraph",
        "text": "Coding Tamilan' tag reference contains additional information about these tags and their attributes."
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_html.html\">&lt;html&gt;</a>",
            "Defines the root of an HTML document"
          ],
          [
            "<a href=\"../tags/tag_body.html\">&lt;body&gt;</a>",
            "Defines the document's body"
          ],
          [
            "<a href=\"../tags/tag_hn.html\">&lt;h1&gt; to &lt;h6&gt;</a>",
            "Defines HTML headings"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "attributes": {
    "title": "HTML Attributes",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML attributes provide additional information about HTML elements."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Attributes"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "All HTML elements can have <b>attributes</b>",
          "Attributes provide <b>additional information</b> about elements",
          "Attributes are always specified in <b>the start tag</b>",
          "Attributes usually come in name/value pairs like: <b>name=\"value\"</b>"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "The href Attribute"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;a&gt;</code> tag defines a hyperlink. The \n<code class=\"w3-codespan\">href</code> attribute specifies the URL of the page \nthe link goes to:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"https://www.codingtamilan.com\">Visit Coding Tamilan</a>"
      },
      {
        "type": "paragraph",
        "text": "You will learn more about links in our <a href=\"#/html/links\">HTML Links\nchapter</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The src Attribute"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;img&gt;</code> tag is used to embed an \nimage in an HTML page. The <code class=\"w3-codespan\">src</code> attribute \nspecifies the path to the image to be displayed:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_girl.jpg\">"
      },
      {
        "type": "paragraph",
        "text": "There are two ways to specify the URL in the <code class=\"w3-codespan\">src</code> \nattribute:"
      },
      {
        "type": "paragraph",
        "text": "<strong>1. Absolute URL</strong> - Links to an external image that is hosted \non another website. Example: <span style=\"word-wrap: break-word;\">src=\"https://www.codingtamilan.com/images/img_girl.jpg\"</span>."
      },
      {
        "type": "paragraph",
        "text": "<strong>Notes:</strong> External images might be under copyright. If you do \nnot get permission to use it, you may be in violation of copyright laws. In \naddition, you cannot control external images; it can suddenly be removed or \nchanged."
      },
      {
        "type": "paragraph",
        "text": "<strong>2. Relative URL</strong> - Links to an image that is hosted within \nthe website. Here, the URL does not include the domain name. If the URL begins \nwithout a slash, it will be relative to the current page. Example: src=\"img_girl.jpg\". \nIf the URL begins with a slash, it will be relative to the domain. Example: src=\"/images/img_girl.jpg\"."
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> It is almost always best to use relative URLs. They \nwill not break if you change domain."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The width and height Attributes"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;img&gt;</code> tag should also contain the\n<code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">\nheight</code> attributes, which specify the width and \nheight of the image (in pixels):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_girl.jpg\" width=\"500\" height=\"600\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The alt Attribute"
      },
      {
        "type": "paragraph",
        "text": "The required <code class=\"w3-codespan\">alt</code> attribute for the <code class=\"w3-codespan\">&lt;img&gt;</code> \ntag specifies an \nalternate text for an image, if the image for some reason cannot be displayed. \nThis can be due to \na slow connection, or an error in the <code class=\"w3-codespan\">src</code> attribute, or if the user uses a screen \nreader."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_girl.jpg\" alt=\"Girl \n  with a jacket\">"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_typo.jpg\" alt=\"Girl \n  with a jacket\">"
      },
      {
        "type": "paragraph",
        "text": "You will learn more about images in our <a href=\"#/html/images\">HTML Images chapter</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The style Attribute"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">style</code> attribute is used to add styles to \nan element, such as color, font, size, and more."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p style=\"color:red;\">This is a red paragraph.</p>"
      },
      {
        "type": "paragraph",
        "text": "You will learn more about styles in our <a href=\"#/html/styles\">HTML Styles chapter</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The lang Attribute"
      },
      {
        "type": "paragraph",
        "text": "You should always include the <code class=\"w3-codespan\">lang</code> attribute \ninside the <code class=\"w3-codespan\">&lt;html&gt;</code> tag, to declare the \nlanguage of the Web page. This is meant to assist search engines and browsers."
      },
      {
        "type": "paragraph",
        "text": "The following example specifies English as the language:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html lang=\"en\"><body>...</body></html>"
      },
      {
        "type": "paragraph",
        "text": "Country codes can also be added to the language code in the <code class=\"w3-codespan\">lang</code> \nattribute. So, the first two characters define the language of the HTML page, \nand the last two characters define the country."
      },
      {
        "type": "paragraph",
        "text": "The following example specifies English as the language and United States as \nthe country:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html lang=\"en-US\"><body>...</body></html>"
      },
      {
        "type": "paragraph",
        "text": "You can see all the language codes in our\n<a href=\"../tags/ref_language_codes.html\">HTML Language Code Reference</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The title Attribute"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">title</code> attribute defines some extra \ninformation about an \nelement."
      },
      {
        "type": "paragraph",
        "text": "The value of the title attribute will be displayed as a tooltip when \nyou mouse over the element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p title=\"I'm a tooltip\">This is a paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "We Suggest: Always Use Lowercase Attributes"
      },
      {
        "type": "paragraph",
        "text": "The HTML standard does not require lowercase attribute names."
      },
      {
        "type": "paragraph",
        "text": "The title attribute (and all other attributes) can be written with uppercase or lowercase \nlike <strong>title</strong> or <strong>TITLE</strong>."
      },
      {
        "type": "paragraph",
        "text": "However, W3C <strong>recommends</strong> lowercase attributes in HTML, and <strong>demands</strong> \nlowercase attributes for stricter document types like XHTML."
      },
      {
        "type": "note",
        "text": "<p>At Coding Tamilan we always use lowercase attribute names.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "We Suggest: Always Quote Attribute Values"
      },
      {
        "type": "paragraph",
        "text": "The HTML standard does not require quotes around attribute values."
      },
      {
        "type": "paragraph",
        "text": "However, W3C <b>recommends</b> quotes in HTML, and <strong>demands</strong> quotes for \nstricter document types like XHTML."
      },
      {
        "type": "example",
        "title": "Good:",
        "code": "<a href=\"https://www.codingtamilan.com/html/\">Visit our HTML tutorial</a>"
      },
      {
        "type": "example",
        "title": "Bad:",
        "code": "<a href=https://www.codingtamilan.com/html/>Visit our HTML tutorial</a>"
      },
      {
        "type": "paragraph",
        "text": "Sometimes you have to use quotes. This example will not display \nthe title attribute correctly, because it contains a space:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p\n title=Description of Coding Tamilan>"
      },
      {
        "type": "note",
        "text": "<p>&nbsp;At Coding Tamilan we always use quotes around attribute values.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Single or Double Quotes?"
      },
      {
        "type": "paragraph",
        "text": "Double quotes around attribute values are the most common in HTML, but single \nquotes can also be used."
      },
      {
        "type": "paragraph",
        "text": "In some situations, when the attribute value itself contains double quotes, it is necessary to use single quotes:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p title='John \"ShotGun\" Nelson'>"
      },
      {
        "type": "paragraph",
        "text": "Or vice versa:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p title=\"John 'ShotGun' Nelson\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "All HTML elements can have <strong>attributes</strong>",
          "The <code class=\"w3-codespan\">href</code> attribute of <code class=\"w3-codespan\">\n  &lt;a&gt;</code> specifies the URL of the page the link goes to",
          "The <code class=\"w3-codespan\">src</code> attribute of <code class=\"w3-codespan\">\n  &lt;img&gt;</code> specifies the path to the image to be displayed",
          "The <code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">height</code> attributes \n  of <code class=\"w3-codespan\">&lt;img&gt;</code> provide size information for images",
          "The <code class=\"w3-codespan\">alt</code> attribute of <code class=\"w3-codespan\">\n  &lt;img&gt;</code> provides an alternate text for an image",
          "The <code class=\"w3-codespan\">style</code> attribute is used to add styles \n  to an element, such as color, font, size, and more",
          "The <code class=\"w3-codespan\">lang</code> attribute \n  of the <code class=\"w3-codespan\">&lt;html&gt;</code> tag declares the \n  language of the Web page",
          "The <code class=\"w3-codespan\">title</code> attribute defines some extra \n  information about an element"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Attribute Reference"
      },
      {
        "type": "note",
        "text": "<p>A complete list of all attributes for each HTML element, is listed in our:\n<a href=\"../tags/ref_attributes.html\">HTML Attribute Reference</a>.</p>"
      }
    ]
  },
  "headings": {
    "title": "HTML Headings",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML headings are titles or subtitles that you want to display on a webpage."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Headings"
      },
      {
        "type": "paragraph",
        "text": "HTML headings are defined with the <code class=\"w3-codespan\">&lt;h1&gt;</code> to <code class=\"w3-codespan\">&lt;h6&gt;</code> tags."
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;h1&gt;</code> defines the most important heading. <code class=\"w3-codespan\">&lt;h6&gt;</code> defines the least important heading."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1>Heading 1</h1>\n<h2>Heading 2</h2>\n<h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5><h6>Heading 6</h6>"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Browsers automatically add some white space (a margin) before and after a heading.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Headings Are Important"
      },
      {
        "type": "paragraph",
        "text": "Search engines use the headings to index the structure and content of your web pages."
      },
      {
        "type": "paragraph",
        "text": "Users often skim a page by its headings. It is important to use headings to show the document structure."
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;h1&gt;</code> headings should be used for main headings, followed by <code class=\"w3-codespan\">&lt;h2&gt;</code> headings, then the less important \n<code class=\"w3-codespan\">&lt;h3&gt;</code>, and so on."
      },
      {
        "type": "paragraph",
        "text": "For example:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "<code class=\"w3-codespan\">&lt;h1&gt;</code> - Page title",
          "<code class=\"w3-codespan\">&lt;h2&gt;</code> - Section titles",
          "<code class=\"w3-codespan\">&lt;h3&gt;</code> - Sub-sections"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1>Travel Guide</h1>\n<h2>Europe</h2>\n<h3>France</h3>\n<h3>Italy</h3>\n<h2>Asia</h2>\n<h3>India</h3>\n<h3>Thailand</h3>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> Use only one <code class=\"w3-codespan\">&lt;h1&gt;</code> per page - it represents the main topic or title.</p>\n  <p><strong>Note:</strong> Use HTML headings for headings only. Don't use headings to make text \n  <strong>BIG</strong> or <strong>bold</strong>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Bigger Headings"
      },
      {
        "type": "paragraph",
        "text": "Each HTML heading has a default size. However, you can specify the size for any heading \nwith the <code class=\"w3-codespan\">style</code> attribute, using the CSS <code class=\"w3-codespan\">font-size</code> property:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 \n  style=\"font-size:60px;\">Heading 1</h1>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Tag Reference"
      },
      {
        "type": "paragraph",
        "text": "Coding Tamilan' tag reference contains additional information about these tags and their attributes."
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_html.html\">&lt;html&gt;</a>",
            "Defines the root of an HTML document"
          ],
          [
            "<a href=\"../tags/tag_body.html\">&lt;body&gt;</a>",
            "Defines the document's body"
          ],
          [
            "<a href=\"../tags/tag_hn.html\">&lt;h1&gt; to &lt;h6&gt;</a>",
            "Defines HTML headings"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "paragraphs": {
    "title": "HTML Paragraphs",
    "blocks": [
      {
        "type": "intro",
        "text": "A paragraph always starts on a new line, and is usually a block of text."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Paragraphs"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;p&gt;</code> element defines a paragraph."
      },
      {
        "type": "paragraph",
        "text": "A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This is a paragraph.</p>\n<p>This is another paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Display"
      },
      {
        "type": "paragraph",
        "text": "You cannot be sure how HTML will be displayed."
      },
      {
        "type": "paragraph",
        "text": "Large or small screens, and resized windows will create different results."
      },
      {
        "type": "paragraph",
        "text": "With HTML, you cannot change the display by adding extra spaces or extra lines in your HTML code."
      },
      {
        "type": "paragraph",
        "text": "The browser will automatically remove any extra spaces and lines when the page is \ndisplayed:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This paragraphcontains a lot of linesin the source code,but \n the browser ignores it.</p><p>This paragraphcontains         \n a lot of spacesin the source         \n code,but the        browser ignores \n it.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Horizontal Rules"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;hr&gt;</code> tag defines a thematic break in an HTML page, and is most often \ndisplayed as a horizontal rule."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;hr&gt;</code> element is used to separate content (or define a change) in an HTML \npage:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1>This is heading 1</h1><p>This is some text.</p><hr><h2>This is heading 2</h2><p>This is some other text.</p><hr>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;hr&gt;</code> tag is an empty tag, which means that it has no end tag."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Line Breaks"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;br&gt;</code> element defines a line break."
      },
      {
        "type": "paragraph",
        "text": "Use <code class=\"w3-codespan\">&lt;br&gt;</code> if you want a line break (a new line) without starting a new paragraph:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This is<br>a paragraph<br>with line breaks.</p>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;br&gt;</code> tag is an empty tag, which means that it has no end tag."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The Poem Problem"
      },
      {
        "type": "paragraph",
        "text": "This poem will display on a single line:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>  My Bonnie lies over \n the ocean.  My Bonnie lies over the sea.  My Bonnie \n lies over the ocean.  Oh, bring back my Bonnie to me.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Solution - The HTML <pre> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;pre&gt;</code> element defines preformatted text."
      },
      {
        "type": "paragraph",
        "text": "The text inside a <code class=\"w3-codespan\">&lt;pre&gt;</code> element is displayed in a fixed-width font (usually \nCourier), and it preserves both spaces and line breaks:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<pre>  My Bonnie lies over the ocean.\n  My Bonnie lies over the sea.  My Bonnie lies over the \nocean.  Oh, bring back my Bonnie to me.</pre>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Tag Reference"
      },
      {
        "type": "paragraph",
        "text": "Coding Tamilan' tag reference contains additional information about HTML elements and their attributes."
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_p.html\">&lt;p&gt;</a>",
            "Defines a paragraph"
          ],
          [
            "<a href=\"../tags/tag_hr.html\">&lt;hr&gt;</a>",
            "Defines a thematic change in the content"
          ],
          [
            "<a href=\"../tags/tag_br.html\">&lt;br&gt;</a>",
            "Inserts a single line break"
          ],
          [
            "<a href=\"../tags/tag_pre.html\">&lt;pre&gt;</a>",
            "Defines pre-formatted text"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "styles": {
    "title": "HTML Styles",
    "blocks": [
      {
        "type": "intro",
        "text": "The HTML <code class=\"w3-codespan\">style</code> attribute is used to add styles to an element, such as color, font, size, and more."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML Style Attribute"
      },
      {
        "type": "paragraph",
        "text": "Setting the style of an HTML element, can be done with the <code class=\"w3-codespan\">style</code> attribute."
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">style</code> attribute has the following syntax:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<tagname\nstyle=\"property:value;\">"
      },
      {
        "type": "paragraph",
        "text": "The <em><strong>property</strong></em> is a CSS property. The <em><strong>value</strong></em> is a CSS value."
      },
      {
        "type": "note",
        "text": "<p>You will learn more about CSS later in this tutorial.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Background Color"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">background-color</code> property defines the background color \nfor an HTML element."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<body style=\"background-color:powderblue;\"><h1>This is a heading</h1><p>This is a paragraph.</p></body>"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<body><h1 style=\"background-color:powderblue;\">This is a heading</h1><p \n  style=\"background-color:tomato;\">This is a paragraph.</p></body>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Text Color"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">color</code> property defines the text color for \nan HTML element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"color:blue;\">This is a heading</h1>\n <p style=\"color:red;\">This is a paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Fonts"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">font-family</code> property defines the font to be used  \nfor an HTML element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"font-family:verdana;\">This is a heading</h1><p style=\"font-family:courier;\">This is a paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Text Size"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">font-size</code> property defines the text size for \nan HTML element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"font-size:300%;\">This is a heading</h1><p \nstyle=\"font-size:160%;\">This is a paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Text Alignment"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">text-align</code> property defines the horizontal text alignment for an HTML element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"text-align:center;\">Centered Heading</h1>\n <p style=\"text-align:center;\">Centered paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Use the <code class=\"w3-codespan\">style</code> attribute for styling HTML elements",
          "Use <code class=\"w3-codespan\">background-color</code> for background color",
          "Use <code class=\"w3-codespan\">color</code> for text colors",
          "Use <code class=\"w3-codespan\">font-family</code> for text fonts",
          "Use <code class=\"w3-codespan\">font-size</code> for text sizes",
          "Use <code class=\"w3-codespan\">text-align</code> for text alignment"
        ]
      }
    ]
  },
  "formatting": {
    "title": "HTML Text Formatting",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML contains several elements for defining text with a special meaning."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Formatting Elements"
      },
      {
        "type": "paragraph",
        "text": "Formatting elements were designed to display special types of text:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "<code class=\"w3-codespan\">&lt;b&gt;</code> - Bold text",
          "<code class=\"w3-codespan\">&lt;strong&gt;</code> - Important text",
          "<code class=\"w3-codespan\">&lt;i&gt;</code> - Italic text",
          "<code class=\"w3-codespan\">&lt;em&gt;</code> - Emphasized text",
          "<code class=\"w3-codespan\">&lt;mark&gt;</code> - Marked text",
          "<code class=\"w3-codespan\">&lt;small&gt;</code> - Smaller text",
          "<code class=\"w3-codespan\">&lt;del&gt;</code> - Deleted text",
          "<code class=\"w3-codespan\">&lt;ins&gt;</code> - Inserted text",
          "<code class=\"w3-codespan\">&lt;sub&gt;</code> - Subscript text",
          "<code class=\"w3-codespan\">&lt;sup&gt;</code> - Superscript text"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <b> and <strong> Elements"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;b&gt;</code> element defines bold text, \nwithout any extra importance."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<b>This text is bold</b>"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;strong&gt;</code> element defines text \nwith strong importance. The content inside is typically displayed in bold."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<strong>This text is \n     important!</strong>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <i> and <em> Elements"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;i&gt;</code> element defines a part of \ntext in an alternate voice or mood. The content inside is typically displayed in \nitalic."
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> The <code class=\"w3-codespan\">&lt;i&gt;</code> tag is often used to indicate a technical term, \na phrase from another language, a thought, a ship name, etc."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<i>This text is italic</i>"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;em&gt;</code> element defines \nemphasized text. The content inside is typically displayed in italic."
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> A screen reader will pronounce the words in <code class=\"w3-codespan\">&lt;em&gt;</code> \nwith an emphasis, using verbal stress."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<em>This text is \n emphasized</em>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <small> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;small&gt;</code> element defines \nsmaller text:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<small>This is some smaller text.</small>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <mark> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;mark&gt;</code> element defines text \nthat should be marked or highlighted:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>Do not forget to buy <mark>milk</mark> today.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <del> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;del&gt;</code> element defines text \nthat has been deleted from a document. Browsers will usually strike a line \nthrough deleted text:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>My favorite color is <del>blue</del> red.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <ins> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;ins&gt;</code> element defines a text \nthat has been inserted into a document. Browsers will usually underline inserted \ntext:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <sub> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;sub&gt;</code> element defines \nsubscript text. Subscript text appears half a character below the normal line, \nand is sometimes rendered in a smaller font. Subscript text can be used for \nchemical formulas, like H<sub>2</sub>O:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This \n is <sub>subscripted</sub> text.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <sup> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;sup&gt;</code> element defines \nsuperscript text. Superscript text appears half a character above the normal \nline, and is sometimes rendered in a smaller font. Superscript text can be used \nfor footnotes, like WWW<sup>[1]</sup>:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This \n is <sup>superscripted</sup> text.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Text Formatting Elements"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_b.html\">&lt;b&gt;</a>",
            "Defines bold text"
          ],
          [
            "<a href=\"../tags/tag_em.html\">&lt;em&gt;</a>",
            "Defines emphasized text&nbsp;"
          ],
          [
            "<a href=\"../tags/tag_i.html\">&lt;i&gt;</a>",
            "Defines a part of text in an alternate voice or mood"
          ],
          [
            "<a href=\"../tags/tag_small.html\">&lt;small&gt;</a>",
            "Defines smaller text"
          ],
          [
            "<a href=\"../tags/tag_strong.html\">&lt;strong&gt;</a>",
            "Defines important text"
          ],
          [
            "<a href=\"../tags/tag_sub.html\">&lt;sub&gt;</a>",
            "Defines subscripted text"
          ],
          [
            "<a href=\"../tags/tag_sup.html\">&lt;sup&gt;</a>",
            "Defines superscripted text"
          ],
          [
            "<a href=\"../tags/tag_ins.html\">&lt;ins&gt;</a>",
            "Defines inserted text"
          ],
          [
            "<a href=\"../tags/tag_del.html\">&lt;del&gt;</a>",
            "Defines deleted text"
          ],
          [
            "<a href=\"../tags/tag_mark.html\">&lt;mark&gt;</a>",
            "Defines marked/highlighted text"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "quotations": {
    "title": "HTML Quotation and Citation Elements",
    "blocks": [
      {
        "type": "intro",
        "text": "In this chapter we will go through the \n<code class=\"w3-codespan\">&lt;blockquote&gt;</code>,<code class=\"w3-codespan\">&lt;q&gt;</code>, <code class=\"w3-codespan\">&lt;abbr&gt;</code>, <code class=\"w3-codespan\">&lt;address&gt;</code>, <code class=\"w3-codespan\">&lt;cite&gt;</code>, \nand <code class=\"w3-codespan\">&lt;bdo&gt;</code> HTML elements."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <blockquote> for Quotations"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;blockquote&gt;</code> element defines a section that \nis quoted from another source."
      },
      {
        "type": "paragraph",
        "text": "Browsers usually indent <code class=\"w3-codespan\">&lt;blockquote&gt;</code> elements."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>Here is a quote from WWF's website:</p><blockquote cite=\"http://www.worldwildlife.org/who/index.html\">\n  For 60 years, WWF has worked to help people and nature thrive. As the world's \n  leading conservation organization, WWF works in nearly 100 countries. At every \n  level, we collaborate with people around the world to develop and deliver \n  innovative solutions that protect communities, wildlife, and the places in \n  which they live.</blockquote>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <q> for Short Quotations"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;q&gt;</code> tag defines a short quotation."
      },
      {
        "type": "paragraph",
        "text": "Browsers normally insert quotation marks around the quotation."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>WWF's goal is to: <q>Build a future where people live in harmony with \n nature.</q></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <abbr> for Abbreviations"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;abbr&gt;</code> tag defines an abbreviation or an acronym, like \"HTML\", \n\"CSS\", \"Mr.\", \n\"Dr.\", \"ASAP\", \"ATM\"."
      },
      {
        "type": "paragraph",
        "text": "Marking abbreviations can give useful information to browsers, translation \nsystems and search-engines."
      },
      {
        "type": "paragraph",
        "text": "<b>Tip:</b> Use the global title attribute to \nshow the description for the \nabbreviation/acronym when you mouse over the element.&nbsp;"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>The <abbr title=\"World Health Organization\">WHO</abbr> was founded in \n 1948.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <address> for Contact Information"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;address&gt;</code> tag defines the contact information for the author/owner of a document \nor an article."
      },
      {
        "type": "paragraph",
        "text": "The contact information can be an email address, URL, physical address, phone \nnumber, social media handle, etc."
      },
      {
        "type": "paragraph",
        "text": "The text in the <code class=\"w3-codespan\">&lt;address&gt;</code> element usually renders in <i>italic,</i> \nand browsers will\nalways add a line break before and after the <code class=\"w3-codespan\">&lt;address&gt;</code> element."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<address>Written by John Doe.<br> Visit us at:<br>Example.com<br>\n Box 564, Disneyland<br>USA</address>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <cite> for Work Title"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;cite&gt;</code> tag defines the title of a \ncreative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.)."
      },
      {
        "type": "paragraph",
        "text": "<b>Note:</b> A person's name is not the title of a work."
      },
      {
        "type": "paragraph",
        "text": "The text in the <code class=\"w3-codespan\">&lt;cite&gt;</code> element usually renders in <i>italic</i>."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p><cite>The Scream</cite> by Edvard Munch. Painted in 1893.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <bdo> for Bi-Directional Override"
      },
      {
        "type": "paragraph",
        "text": "BDO stands for Bi-Directional Override."
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;bdo&gt;</code> tag is used to override \nthe current text direction:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<bdo dir=\"rtl\">This text will be written from right to left</bdo>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Quotation and Citation Elements"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_abbr.html\">&lt;abbr&gt;</a>",
            "Defines an abbreviation or acronym"
          ],
          [
            "<a href=\"../tags/tag_address.html\">&lt;address&gt;</a>",
            "Defines contact information for the author/owner of a document"
          ],
          [
            "<a href=\"../tags/tag_bdo.html\">&lt;bdo&gt;</a>",
            "Defines the text direction"
          ],
          [
            "<a href=\"../tags/tag_blockquote.html\">&lt;blockquote&gt;</a>",
            "Defines a section that is quoted from another source"
          ],
          [
            "<a href=\"../tags/tag_cite.html\">&lt;cite&gt;</a>",
            "Defines the title of a work"
          ],
          [
            "<a href=\"../tags/tag_q.html\">&lt;q&gt;</a>",
            "Defines a short inline quotation"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "comments": {
    "title": "HTML Comments",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML comments are not displayed in the browser, but they can \nhelp document your HTML source code."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Comment Tag"
      },
      {
        "type": "paragraph",
        "text": "You can add comments to your HTML source by using the following syntax:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!-- Write your comments here -->"
      },
      {
        "type": "paragraph",
        "text": "Notice that there is an exclamation point (!) in the start tag, but not in the \nend tag."
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Comments are not displayed by the browser, but they can help document your HTML source code.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Add Comments"
      },
      {
        "type": "paragraph",
        "text": "With comments you can place notifications and reminders in your HTML code:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!-- This is a comment --><p>This is a paragraph.</p>\n<!-- Remember to add more information here -->"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Hide Content"
      },
      {
        "type": "paragraph",
        "text": "Comments can be used to hide content."
      },
      {
        "type": "paragraph",
        "text": "This can be helpful if you hide content temporarily:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This is a paragraph.</p><!-- <p>This is another paragraph \n  </p> --><p>This is a paragraph too.</p>"
      },
      {
        "type": "paragraph",
        "text": "You can also hide more than one line. Everything between the <code class=\"w3-codespan\">&lt;!--</code> and the <code class=\"w3-codespan\">--&gt;</code>\nwill be hidden from the display."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This is a paragraph.</p><!--<p>Look at this cool \n  image:</p>\n<img border=\"0\" src=\"pic_trulli.jpg\" \nalt=\"Trulli\">--><p>This is a paragraph too.</p>"
      },
      {
        "type": "paragraph",
        "text": "Comments are also great for debugging HTML, because you can \ncomment out HTML lines of code, one at a time, to search for errors."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Hide Inline Content"
      },
      {
        "type": "paragraph",
        "text": "Comments can be used to hide parts in the middle of the HTML code."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>This <!-- great text --> is a paragraph.</p>"
      }
    ]
  },
  "colors": {
    "title": "HTML Colors",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML colors are specified with predefined color names, or with \nRGB, HEX, HSL, RGBA, or HSLA values."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Color Names"
      },
      {
        "type": "paragraph",
        "text": "In HTML, a color can be specified by using a color name:"
      },
      {
        "type": "paragraph",
        "text": "<a target=\"_blank\" href=\"tryit8c5f.html?filename=tryhtml_color_names\" class=\"ws-btn w3-margin-bottom\">Try it Yourself »</a>"
      },
      {
        "type": "paragraph",
        "text": "HTML supports <a href=\"../colors/colors_names.html\">140 standard color names</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Background Color"
      },
      {
        "type": "paragraph",
        "text": "You can set the background color for HTML elements:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"background-color:DodgerBlue;\">Hello World</h1><p style=\"background-color:Tomato;\">Lorem \n  ipsum...</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Text Color"
      },
      {
        "type": "paragraph",
        "text": "You can set the color of text:"
      },
      {
        "type": "header",
        "level": 3,
        "text": "Hello World"
      },
      {
        "type": "paragraph",
        "text": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat."
      },
      {
        "type": "paragraph",
        "text": "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"color:Tomato;\">Hello \n  World</h1><p style=\"color:DodgerBlue;\">Lorem \n  ipsum...</p><p style=\"color:MediumSeaGreen;\">Ut wisi \n  enim...</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Border Color"
      },
      {
        "type": "paragraph",
        "text": "You can set the color of borders:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Hello World"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Hello World"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Hello World"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"border:2px \n  solid Tomato;\">Hello \n  World</h1><h1 style=\"border:2px \n  solid DodgerBlue;\">Hello \n  World</h1><h1 style=\"border:2px \n  solid Violet;\">Hello \n  World</h1>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Color Values"
      },
      {
        "type": "paragraph",
        "text": "In HTML, colors can also be specified using RGB values, HEX values, HSL \nvalues, RGBA values, and HSLA values."
      },
      {
        "type": "paragraph",
        "text": "The following three &lt;div&gt; elements have their background color set with RGB, \nHEX, and HSL values:"
      },
      {
        "type": "paragraph",
        "text": "The following two &lt;div&gt; elements have their background color set with RGBA \nand HSLA values, which add an Alpha channel to the color (here we have 50% \ntransparency):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"background-color:rgb(255, \n  99, 71);\">...</h1><h1 style=\"background-color:#ff6347;\">...</h1><h1 style=\"background-color:hsl(9, \n  100%, 64%);\">...</h1><h1 style=\"background-color:rgba(255, \n  99, 71, 0.5);\">...</h1><h1 style=\"background-color:hsla(9, \n  100%, 64%, 0.5);\">...</h1>"
      },
      {
        "type": "note",
        "text": "<h3>Learn more about Color Values</h3>\n<p>You will learn more about <a href=\"html_colors_rgb.html\">RGB</a>, <a href=\"html_colors_hex.html\">HEX</a> and <a href=\"html_colors_hsl.html\">HSL</a> in the next chapters.</p>"
      }
    ]
  },
  "css": {
    "title": "HTML Styles - CSS",
    "blocks": [
      {
        "type": "intro",
        "text": "CSS stands for Cascading Style Sheets."
      },
      {
        "type": "intro",
        "text": "CSS saves a lot of work. It can control the layout of multiple \nweb pages all at once."
      },
      {
        "type": "header",
        "level": 2,
        "text": "What is CSS?"
      },
      {
        "type": "paragraph",
        "text": "Cascading Style Sheets (CSS) is used to format the layout of a webpage."
      },
      {
        "type": "paragraph",
        "text": "With CSS, you can control the color, font, the size of text, the spacing \nbetween elements, how elements are positioned and laid out, what background \nimages or background colors are to be used, different displays for different devices \nand screen sizes, and much more!"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> The word <strong>cascading</strong> means that a style \napplied to a parent element will also apply to all children elements within the \nparent. So, if you set the color of the body text to \"blue\", all headings, \nparagraphs, and other text elements within the body will also get the same color (unless you specify \nsomething else)!</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Using CSS"
      },
      {
        "type": "paragraph",
        "text": "CSS can be added to HTML documents in 3 ways:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "<strong>Inline</strong> - by using the <code class=\"w3-codespan\">style</code> attribute inside HTML elements",
          "<strong>Internal</strong> - by using a <code class=\"w3-codespan\">&lt;style&gt;</code> element in the <code class=\"w3-codespan\">&lt;head&gt;</code> section",
          "<strong>External</strong> - by using a <code class=\"w3-codespan\">&lt;link&gt;</code> \n  element to link to an external CSS file"
        ]
      },
      {
        "type": "paragraph",
        "text": "The most common way to add CSS, is to keep the styles in external CSS \nfiles. However, in this tutorial we will use inline and internal styles, because this is easier to \ndemonstrate, and easier for you to try it yourself."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Inline CSS"
      },
      {
        "type": "paragraph",
        "text": "An inline CSS is used to apply a unique style to a single HTML element."
      },
      {
        "type": "paragraph",
        "text": "An inline CSS uses the <code class=\"w3-codespan\">style</code> attribute of an HTML element."
      },
      {
        "type": "paragraph",
        "text": "The following example sets the text color of the <code class=\"w3-codespan\">&lt;h1&gt;</code> element to blue, \nand the text color of the <code class=\"w3-codespan\">&lt;p&gt;</code> element to red:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"color:blue;\">A Blue Heading</h1><p \n  style=\"color:red;\">A red paragraph.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Internal CSS"
      },
      {
        "type": "paragraph",
        "text": "An internal CSS is used to define a style for a single HTML page."
      },
      {
        "type": "paragraph",
        "text": "An internal CSS is defined in the <code class=\"w3-codespan\">&lt;head&gt;</code> section of an HTML page, \nwithin a <code class=\"w3-codespan\">&lt;style&gt;</code> element."
      },
      {
        "type": "paragraph",
        "text": "The following example sets the text color of ALL the <code class=\"w3-codespan\">&lt;h1&gt;</code> elements \n(on that page) to blue, and the text color of ALL the <code class=\"w3-codespan\">&lt;p&gt;</code> elements to \nred. In addition, the page will be displayed with a \"powderblue\" background \ncolor:&nbsp;"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head><style>\n body {background-color: powderblue;}h1   {color: blue;}p    {color: red;}\n</style></head><body><h1>This is a \n heading</h1><p>This is a paragraph.</p></body></html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "External CSS"
      },
      {
        "type": "paragraph",
        "text": "An external style sheet is used to define the style for many HTML pages."
      },
      {
        "type": "paragraph",
        "text": "To use an external style sheet, add a link to it in the <code class=\"w3-codespan\">&lt;head&gt;</code> section of each HTML page:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head>\n  <link rel=\"stylesheet\" href=\"styles.css\">\n</head><body><h1>This is a heading</h1><p>This is a paragraph.</p></body></html>"
      },
      {
        "type": "paragraph",
        "text": "The external style sheet can be written in any text editor. The file must not contain any \nHTML code, and must be saved with a .css extension."
      },
      {
        "type": "paragraph",
        "text": "Here is what the \"styles.css\" file looks like:"
      },
      {
        "type": "example",
        "title": "\"styles.css\":",
        "code": "body {  background-color: powderblue;}h1 {  color: blue;}p {  color: red;}"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> With an external style sheet, you can change the look of an entire web site, by changing one file!</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Colors, Fonts and Sizes"
      },
      {
        "type": "paragraph",
        "text": "Here, we will demonstrate some commonly used CSS properties. You will learn \nmore about them later."
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">color</code> property defines the text color to be used."
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">font-family</code> property defines the font to be used."
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">font-size</code> property defines the text size to be used."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>\n <html><head><style>h1 {  color: blue;  font-family: verdana;  font-size: 300%;}p {\n    color: red;  \n font-family: courier;  font-size: 160%;}</style></head><body>\n <h1>This is a heading</h1><p>This is a paragraph.</p></body></html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Border"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">border</code> property defines a border \naround an HTML element."
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> You can define a border for nearly all HTML elements."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "p {  border: 2px \nsolid powderblue;}"
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Padding"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">padding</code> property defines a padding \n(space) between the text and the border."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "p {  border: 2px \nsolid powderblue;  padding: 30px;}"
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Margin"
      },
      {
        "type": "paragraph",
        "text": "The CSS <code class=\"w3-codespan\">margin</code> property defines a margin \n(space) outside the border."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "p {  border: 2px \nsolid powderblue;  margin: 50px;\n }"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Link to External CSS"
      },
      {
        "type": "paragraph",
        "text": "External style sheets can be referenced with a full URL or with a path relative to the current web page."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<link rel=\"stylesheet\" href=\"https://www.codingtamilan.com/html/styles.css\">"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<link rel=\"stylesheet\" href=\"/html/styles.css\">"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<link rel=\"stylesheet\" href=\"styles.css\">"
      },
      {
        "type": "note",
        "text": "<p>You can read more about file paths in the chapter <a href=\"#/html/filepaths\">HTML \nFile Paths</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Use the HTML <code class=\"w3-codespan\">style</code> attribute for inline styling",
          "Use the HTML <code class=\"w3-codespan\">&lt;style&gt;</code> element to define internal CSS",
          "Use the HTML <code class=\"w3-codespan\">&lt;link&gt;</code> element to refer to an external CSS file",
          "Use the HTML <code class=\"w3-codespan\">&lt;head&gt;</code> element to store &lt;style&gt; and &lt;link&gt; elements",
          "Use the CSS <code class=\"w3-codespan\">color</code> property for text colors",
          "Use the CSS <code class=\"w3-codespan\">font-family</code> property for text fonts",
          "Use the CSS <code class=\"w3-codespan\">font-size</code> property for text sizes",
          "Use the CSS <code class=\"w3-codespan\">border</code> property for borders",
          "Use the CSS <code class=\"w3-codespan\">padding</code> property for space inside the border",
          "Use the CSS <code class=\"w3-codespan\">margin</code> property for space outside the border"
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> You can learn much more about CSS in our <a href=\"../css/default.html\">CSS Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Style Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_style.html\">&lt;style&gt;</a>",
            "Defines style information for an HTML document"
          ],
          [
            "<a href=\"../tags/tag_link.html\">&lt;link&gt;</a>",
            "Defines a link between a document and an external resource"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "links": {
    "title": "HTML Links",
    "blocks": [
      {
        "type": "intro",
        "text": "Links are found in nearly all web pages. Links allow users to click their way from page to page."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Links - Hyperlinks"
      },
      {
        "type": "paragraph",
        "text": "HTML links are hyperlinks."
      },
      {
        "type": "paragraph",
        "text": "You can click on a link and jump to another document."
      },
      {
        "type": "paragraph",
        "text": "When you move the mouse over a link, the mouse arrow will turn into a little hand."
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> A link does not have to be text. A link can be an image \n  or any other HTML element!</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Links - Syntax"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;a&gt;</code> tag defines a hyperlink. \nIt has the following syntax:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"url\">link text</a>"
      },
      {
        "type": "paragraph",
        "text": "The most important attribute of the <code class=\"w3-codespan\">&lt;a&gt;</code> <a> element is the <code class=\"w3-codespan\">\nhref</code> attribute, which indicates the link's destination.</a>"
      },
      {
        "type": "paragraph",
        "text": "The <em>link text</em> is the part that will be visible to the reader."
      },
      {
        "type": "paragraph",
        "text": "Clicking on the link text, will send the reader to the specified URL address."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"https://www.codingtamilan.com/\">Visit Coding Tamilan!</a>"
      },
      {
        "type": "paragraph",
        "text": "By default, links will appear as follows in all browsers:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "An unvisited link is underlined and blue",
          "A visited link is underlined and purple",
          "An active link is underlined and red"
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> Links can of course be styled with CSS, to get \n  another look!</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Links - The target Attribute"
      },
      {
        "type": "paragraph",
        "text": "By default, the linked page will be displayed in the current browser window. \nTo change this, you must specify another target for the link."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">target</code> attribute specifies where to open the linked document."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">target</code> attribute can have one of the following values:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "<code class=\"w3-codespan\">_self</code> - Default. Opens the document in \n  the same window/tab as it was clicked",
          "<code class=\"w3-codespan\">_blank</code> - Opens the document in a new window or tab",
          "<code class=\"w3-codespan\">_parent</code> - Opens the document in the parent frame",
          "<code class=\"w3-codespan\">_top</code> - Opens the document in the full body of the window"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"https://www.codingtamilan.com/\"\ntarget=\"_blank\">Visit Coding Tamilan!</a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Absolute URLs vs. Relative URLs"
      },
      {
        "type": "paragraph",
        "text": "Both examples above are using an <strong>absolute URL</strong> (a full web address) \nin the <code class=\"w3-codespan\">href</code> attribute."
      },
      {
        "type": "paragraph",
        "text": "A local link (a link to a page within the same website) is specified with a \n<strong>relative URL</strong> (without \nthe \"https://www\" part):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h2>Absolute URLs</h2><p><a href=\"https://www.w3.org/\">W3C</a></p>\n  <p><a href=\"https://www.google.com/\">Google</a></p><h2>Relative \n  URLs</h2><p><a href=\"html_images.asp\">HTML Images</a></p><p><a href=\"/css/default.asp\">CSS \n  Tutorial</a></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Links - Use an Image as a Link"
      },
      {
        "type": "paragraph",
        "text": "To use an image as a link, just put the <code class=\"w3-codespan\">&lt;img&gt;</code> \ntag inside the <code class=\"w3-codespan\">&lt;a&gt;</code> tag:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"default.asp\"><img src=\"smiley.gif\" alt=\"HTML tutorial\" style=\"width:42px;height:42px;\"></a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Link to an Email Address"
      },
      {
        "type": "paragraph",
        "text": "Use <code class=\"w3-codespan\">\nmailto:</code> inside the <code class=\"w3-codespan\">\nhref</code> attribute to create a link that opens the user's email program (to \nlet them send a new email):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"mailto:someone@example.com\">Send email</a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Button as a Link"
      },
      {
        "type": "paragraph",
        "text": "To use an HTML button as a link, you have to add some JavaScript code."
      },
      {
        "type": "paragraph",
        "text": "JavaScript allows you to specify what happens at certain events, such as a click of a button:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<button \n  onclick=\"document.location='default.asp'\">HTML Tutorial</button>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> Learn more about JavaScript in our <a href=\"../js/default.html\">JavaScript Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Link Titles"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">title</code> attribute specifies extra information about an element.\nThe information is most often shown as a tooltip text when the mouse moves over the element."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"https://www.codingtamilan.com/html/\" title=\"Go to Coding Tamilan HTML \n  section\">Visit our HTML Tutorial</a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "More on Absolute URLs and Relative URLs"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"https://www.codingtamilan.com/html/default.asp\">HTML tutorial</a>"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"/html/default.asp\">HTML tutorial</a>"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"default.asp\">HTML tutorial</a>"
      },
      {
        "type": "note",
        "text": "<p>You can read more about file paths in the chapter <a href=\"#/html/filepaths\">HTML \nFile Paths</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Use the <code class=\"w3-codespan\">&lt;a&gt;</code> element to define a link",
          "Use the <code class=\"w3-codespan\">href</code> attribute to define the link address",
          "Use the <code class=\"w3-codespan\">target</code> attribute to define where to open the linked document",
          "Use the <code class=\"w3-codespan\">&lt;img&gt;</code> element (inside <code class=\"w3-codespan\">&lt;a&gt;</code>) \n  to use an image as a link",
          "Use the <code class=\"w3-codespan\">\n  mailto:</code> scheme inside the <code class=\"w3-codespan\">\nhref</code> attribute to create a link that opens the user's email program"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Link Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_a.html\">&lt;a&gt;</a>",
            "Defines a hyperlink"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "images": {
    "title": "HTML Images",
    "blocks": [
      {
        "type": "intro",
        "text": "Images can improve the design and the appearance of a web page."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"pic_trulli.jpg\" \nalt=\"Italian Trulli\">"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_girl.jpg\" \nalt=\"Girl in a jacket\">"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_chania.jpg\" \nalt=\"Flowers in Chania\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Images Syntax"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;img&gt;</code> tag is used to embed an \nimage in a web page."
      },
      {
        "type": "paragraph",
        "text": "Images are not technically inserted into a web page; images are linked to web \npages. The <code class=\"w3-codespan\">&lt;img&gt;</code> tag creates a holding \nspace for the referenced image."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;img&gt;</code> tag&nbsp;is empty, it contains attributes only, and does not \nhave a closing tag."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;img&gt;</code> tag has two required \nattributes:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "src - Specifies the path to the image",
          "alt - Specifies an alternate text for the image"
        ]
      },
      {
        "type": "example",
        "title": "Syntax",
        "code": "<img src=\"url\" alt=\"alternatetext\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The src Attribute"
      },
      {
        "type": "paragraph",
        "text": "The required <code class=\"w3-codespan\">src</code> attribute specifies the path (URL) to the image."
      },
      {
        "type": "paragraph",
        "text": "<strong>Note:</strong> When a web page loads, it is the browser, at that \nmoment, that gets the image from a web server and inserts it into the page. \nTherefore, make sure that the image actually stays in the same spot in relation \nto the web page, otherwise your visitors will get a broken link icon. The broken \nlink icon and the <code class=\"w3-codespan\">alt</code> text are shown if the browser cannot find the image."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_chania.jpg\" alt=\"Flowers \n  in Chania\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The alt Attribute"
      },
      {
        "type": "paragraph",
        "text": "The required <code class=\"w3-codespan\">alt</code> attribute provides an alternate text for an image, if the user for \nsome reason cannot view it (because of slow connection, an error in the src \nattribute, or if the user uses a screen reader)."
      },
      {
        "type": "paragraph",
        "text": "The value of the <code class=\"w3-codespan\">alt</code> attribute should describe the image:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_chania.jpg\" alt=\"Flowers \n  in Chania\">"
      },
      {
        "type": "paragraph",
        "text": "If a browser cannot find an image, it will display the value of the <code class=\"w3-codespan\">alt</code> \nattribute:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"wrongname.gif\" alt=\"Flowers \n  in Chania\">"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> A screen reader is a software program that reads the HTML code, and allows the user to \"listen\" to the content. Screen readers are useful \nfor people who are visually impaired or learning disabled.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Image Size - Width and Height"
      },
      {
        "type": "paragraph",
        "text": "You can use the <code class=\"w3-codespan\">style</code> attribute to specify the width and \nheight of an image."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_girl.jpg\" alt=\"Girl in a jacket\" style=\"width:500px;height:600px;\">"
      },
      {
        "type": "paragraph",
        "text": "Alternatively, you can use the <code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">height</code> attributes:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"img_girl.jpg\" alt=\"Girl in a jacket\" width=\"500\" height=\"600\">"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">height</code> attributes always define the width and height of the \nimage in pixels."
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Always specify the width and height of an image. If width and height are not specified, the \n  web page \n  might flicker while the image loads.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Width and Height, or Style?"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">width</code>, <code class=\"w3-codespan\">height</code>, and <code class=\"w3-codespan\">style</code> attributes are \nall valid in HTML."
      },
      {
        "type": "paragraph",
        "text": "However, we suggest using the <code class=\"w3-codespan\">style</code> attribute. It prevents styles sheets from changing \nthe size of images:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head><style>img {   width: 100%; }\n </style></head><body><img src=\"html5.gif\" alt=\"HTML5 Icon\" width=\"128\" height=\"128\"><img src=\"html5.gif\" alt=\"HTML5 Icon\" style=\"width:128px;height:128px;\"></body></html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Images in Another Folder"
      },
      {
        "type": "paragraph",
        "text": "If you have your images in a sub-folder, you must include the folder \nname in the <code class=\"w3-codespan\">src</code> attribute:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"/images/html5.gif\" \nalt=\"HTML5 Icon\" style=\"width:128px;height:128px;\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Images on Another Server/Website"
      },
      {
        "type": "paragraph",
        "text": "Some web sites point to an image on another server."
      },
      {
        "type": "paragraph",
        "text": "To point to an image on another server, you must specify an absolute (full) \nURL in the <code class=\"w3-codespan\">src</code> attribute:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"https://www.codingtamilan.com/images/codingtamilan_green.jpg\" alt=\"Coding Tamilan\">"
      },
      {
        "type": "paragraph",
        "text": "<strong>Notes on external images:</strong> External images might be under \ncopyright. If you do not get permission to use it, you may be in violation of \ncopyright laws. In addition, you cannot control external images; they can suddenly \nbe removed or changed."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Animated Images"
      },
      {
        "type": "paragraph",
        "text": "HTML allows animated GIFs:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"programming.gif\" alt=\"Computer Man\" style=\"width:48px;height:48px;\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Image as a Link"
      },
      {
        "type": "paragraph",
        "text": "To use an image as a link, put the <code class=\"w3-codespan\">&lt;img&gt;</code> tag inside the <code class=\"w3-codespan\">&lt;a&gt;</code> \ntag:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"default.asp\">  <img src=\"smiley.gif\" alt=\"HTML tutorial\" \nstyle=\"width:42px;height:42px;\"></a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Image Floating"
      },
      {
        "type": "paragraph",
        "text": "Use the CSS <code class=\"w3-codespan\">float</code> property to let the image float to the right or to the left of a text:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p><img src=\"smiley.gif\" alt=\"Smiley face\"\nstyle=\"float:right;width:42px;height:42px;\">\n The image will float to the right of \nthe text.</p><p><img src=\"smiley.gif\" alt=\"Smiley face\"\nstyle=\"float:left;width:42px;height:42px;\">\n The image will float to the left of \nthe text.</p>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> To learn more about CSS Float, read our <a href=\"../css/css_float.html\">CSS Float Tutorial</a>.<br></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Common Image Formats"
      },
      {
        "type": "paragraph",
        "text": "Here are the most common image file types, which are supported in all browsers \n(Chrome, Edge, Firefox, Safari, Opera):"
      },
      {
        "type": "table",
        "headers": [
          "Abbreviation",
          "File Format",
          "File Extension"
        ],
        "rows": [
          [
            "APNG",
            "Animated Portable Network Graphics",
            ".apng"
          ],
          [
            "GIF",
            "Graphics Interchange Format",
            ".gif"
          ],
          [
            "ICO",
            "Microsoft Icon",
            ".ico, .cur"
          ],
          [
            "JPEG",
            "Joint Photographic Expert Group image",
            ".jpg, .jpeg, .jfif, .pjpeg, .pjp"
          ],
          [
            "PNG",
            "Portable Network Graphics",
            ".png"
          ],
          [
            "SVG",
            "Scalable Vector Graphics",
            ".svg"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Use the HTML <code class=\"w3-codespan\">&lt;img&gt;</code> element to define an image",
          "Use the HTML <code class=\"w3-codespan\">src</code> attribute to define the URL of the image",
          "Use the HTML <code class=\"w3-codespan\">alt</code> attribute to define an alternate text for an image, if it cannot be displayed",
          "Use the HTML <code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">height</code> attributes \n  or the CSS <code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">height</code> \n  properties to define the size of the image",
          "Use the CSS <code class=\"w3-codespan\">float</code> property to let the image float \n  to the left or to the right"
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Loading large images takes time, and can slow down your \n  web page. Use images carefully.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Image Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_img.html\">&lt;img&gt;</a>",
            "Defines an image"
          ],
          [
            "<a href=\"../tags/tag_map.html\">&lt;map&gt;</a>",
            "Defines an image map"
          ],
          [
            "<a href=\"../tags/tag_area.html\">&lt;area&gt;</a>",
            "Defines a clickable area inside an image map"
          ],
          [
            "<a href=\"../tags/tag_picture.html\">&lt;picture&gt;</a>",
            "Defines a container for multiple image resources"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Video: HTML Images"
      }
    ]
  },
  "tables": {
    "title": "HTML Tables",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML tables allow web developers to arrange data into rows and \ncolumns."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Define an HTML Table"
      },
      {
        "type": "paragraph",
        "text": "A table in HTML consists of table cells inside rows and columns."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<table> \n<tr>    <th>Company</th>\n    <th>Contact</th>     <th>Country</th>\n \n</tr> \n<tr>    <td>Alfreds Futterkiste</td>\n    <td>Maria \n  Anders</td>     <td>Germany</td>\n \n</tr>  <tr>    <td>Centro \n  comercial Moctezuma</td>\n    <td>Francisco \n  Chang</td>     <td>Mexico</td>\n  </tr></table>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Table Cells"
      },
      {
        "type": "paragraph",
        "text": "Each table cell is defined by a\n<code class=\"w3-codespan\">&lt;td&gt;</code> and a <code class=\"w3-codespan\">&lt;/td&gt;</code> tag."
      },
      {
        "type": "note",
        "text": "<p><code class=\"w3-codespan\">td</code> \nstands for table data.</p>"
      },
      {
        "type": "paragraph",
        "text": "Everything between <code class=\"w3-codespan\">&lt;td&gt;</code> and <code class=\"w3-codespan\">&lt;/td&gt;</code> \nis the content of a table cell."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<table> \n<tr>    <td>Emil</td>\n    <td>Tobias</td>     <td>Linus</td>\n \n</tr></table>"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> A table cell can contain \nall sorts of HTML elements: text, images, lists, links, other tables, etc.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Table Rows"
      },
      {
        "type": "paragraph",
        "text": "Each table row starts with a \n<code class=\"w3-codespan\">&lt;tr&gt;</code> and ends with a <code class=\"w3-codespan\">&lt;/tr&gt;</code> tag."
      },
      {
        "type": "note",
        "text": "<p><code class=\"w3-codespan\">tr</code> \nstands for table row.</p>"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<table> \n<tr>    <td>Emil</td>\n    <td>Tobias</td>     <td>Linus</td>\n \n</tr> \n<tr>    <td>16</td>\n    <td>14</td>     <td>10</td>\n \n</tr></table>"
      },
      {
        "type": "paragraph",
        "text": "You can have as many rows as you like in a table; just make sure that the number of cells are the same in each row."
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> There are times when a row can have less or more cells than another. You will learn about that in a later chapter.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Table Headers"
      },
      {
        "type": "paragraph",
        "text": "Sometimes you want your cells to be table header cells. In those cases use the\n<code class=\"w3-codespan\">&lt;th&gt;</code> tag instead of the\n<code class=\"w3-codespan\">&lt;td&gt;</code> tag:"
      },
      {
        "type": "note",
        "text": "<p><code class=\"w3-codespan\">th</code> \nstands for table header.</p>"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<table> \n<tr>    <th>Person 1</th>\n    <th>Person 2</th>     <th>Person \n  3</th>\n \n</tr> \n<tr>    <td>Emil</td>\n    <td>Tobias</td>     <td>Linus</td>\n \n</tr> \n<tr>    <td>16</td>\n    <td>14</td>     <td>10</td>\n \n</tr></table>"
      },
      {
        "type": "paragraph",
        "text": "By default, the text in <code class=\"w3-codespan\">&lt;th&gt;</code> elements \nare bold and centered, but you can change that with CSS."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Table Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_table.html\">&lt;table&gt;</a>",
            "Defines a table"
          ],
          [
            "<a href=\"../tags/tag_th.html\">&lt;th&gt;</a>",
            "Defines a header cell in a table"
          ],
          [
            "<a href=\"../tags/tag_tr.html\">&lt;tr&gt;</a>",
            "Defines a row in a table"
          ],
          [
            "<a href=\"../tags/tag_td.html\">&lt;td&gt;</a>",
            "Defines a cell in a table"
          ],
          [
            "<a href=\"../tags/tag_caption.html\">&lt;caption&gt;</a>",
            "Defines a table caption"
          ],
          [
            "<a href=\"../tags/tag_colgroup.html\">&lt;colgroup&gt;</a>",
            "Specifies a group of one or more columns in a table for formatting"
          ],
          [
            "<a href=\"../tags/tag_col.html\">&lt;col&gt;</a>",
            "Specifies column properties for each column within a &lt;colgroup&gt; element"
          ],
          [
            "<a href=\"../tags/tag_thead.html\">&lt;thead&gt;</a>",
            "Groups the header content in a table"
          ],
          [
            "<a href=\"../tags/tag_tbody.html\">&lt;tbody&gt;</a>",
            "Groups the body content in a table"
          ],
          [
            "<a href=\"../tags/tag_tfoot.html\">&lt;tfoot&gt;</a>",
            "Groups the footer content in a table"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "lists": {
    "title": "HTML Lists",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML lists allow web developers to group a set of related items in lists."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Unordered HTML List"
      },
      {
        "type": "paragraph",
        "text": "An unordered list starts with the <code class=\"w3-codespan\">&lt;ul&gt;</code> tag. Each list item starts with the \n<code class=\"w3-codespan\">&lt;li&gt;</code> tag."
      },
      {
        "type": "paragraph",
        "text": "The list items will be marked with bullets (small black circles) by default:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<ul>\n \n<li>Coffee</li>  <li>Tea</li>\n \n<li>Milk</li>\n</ul>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Ordered HTML List"
      },
      {
        "type": "paragraph",
        "text": "An ordered list starts with the <code class=\"w3-codespan\">&lt;ol&gt;</code> tag. Each list item starts with the <code class=\"w3-codespan\">&lt;li&gt;</code> tag."
      },
      {
        "type": "paragraph",
        "text": "The list items will be marked with numbers by default:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<ol>\n \n<li>Coffee</li>  <li>Tea</li>\n \n<li>Milk</li>\n</ol>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Description Lists"
      },
      {
        "type": "paragraph",
        "text": "HTML also supports description lists."
      },
      {
        "type": "paragraph",
        "text": "A description list is a list of terms, with a description of each term."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;dl&gt;</code> tag defines the description list, the <code class=\"w3-codespan\">&lt;dt&gt;</code> tag defines the term (name), and the <code class=\"w3-codespan\">&lt;dd&gt;</code>  \ntag describes each term:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<dl>\n \n<dt>Coffee</dt>\n \n<dd>- black hot drink</dd>\n \n<dt>Milk</dt>\n \n<dd>- white cold drink</dd>\n</dl>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML List Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_ul.html\">&lt;ul&gt;</a>",
            "Defines an unordered list"
          ],
          [
            "<a href=\"../tags/tag_ol.html\">&lt;ol&gt;</a>",
            "Defines an ordered list"
          ],
          [
            "<a href=\"../tags/tag_li.html\">&lt;li&gt;</a>",
            "Defines a list item"
          ],
          [
            "<a href=\"../tags/tag_dl.html\">&lt;dl&gt;</a>",
            "Defines a description list"
          ],
          [
            "<a href=\"../tags/tag_dt.html\">&lt;dt&gt;</a>",
            "Defines a term in a description list"
          ],
          [
            "<a href=\"../tags/tag_dd.html\">&lt;dd&gt;</a>",
            "Describes the term in a description list"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "blocks": {
    "title": "HTML Block and Inline Elements",
    "blocks": [
      {
        "type": "intro",
        "text": "Every HTML element has a default display value, depending on what type \nof element it is."
      },
      {
        "type": "intro",
        "text": "The two most common display values are block and inline."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Block-level Elements"
      },
      {
        "type": "paragraph",
        "text": "A block-level element always starts on a new line, and the browsers \nautomatically add some space (a margin) before and after the element."
      },
      {
        "type": "paragraph",
        "text": "A block-level element always takes up the full width available \n(stretches out to the left and right as far as it can)."
      },
      {
        "type": "paragraph",
        "text": "Two commonly used block elements are: <code class=\"w3-codespan\">&lt;p&gt;</code> \nand <code class=\"w3-codespan\">&lt;div&gt;</code>."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;p&gt;</code> element defines a paragraph in an \nHTML document."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;div&gt;</code> element defines a division \nor a section in an HTML document."
      },
      {
        "type": "paragraph",
        "text": "The &lt;p&gt; element is a block-level element."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>Hello World</p><div>Hello World</div>"
      },
      {
        "type": "paragraph",
        "text": "Here are the block-level elements in HTML:"
      },
      {
        "type": "code",
        "code": "<address>\n  <article>\n  <aside>\n  <blockquote>\n  <canvas>\n  <dd>\n  <div>\n  <dl>\n  <dt>\n  <fieldset>\n  <figcaption>\n  <figure>\n  <footer>\n  <form>\n  <h1>-<h6>\n  <header>\n  <hr>\n  <li>\n  <main>\n  <nav>\n  <noscript>\n  <ol>\n  <p>\n  <pre>\n  <section>\n  <table>\n  <tfoot>\n  <ul>\n  <video>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Inline Elements"
      },
      {
        "type": "paragraph",
        "text": "An inline element does not start on a new line."
      },
      {
        "type": "paragraph",
        "text": "An inline element only takes up as much width as necessary."
      },
      {
        "type": "paragraph",
        "text": "This is <span class=\"w3-theme-border\" style=\"border-width:1px;border-style:solid;padding:5px\">a &lt;span&gt; element \ninside</span> a paragraph."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<span>Hello World</span>"
      },
      {
        "type": "paragraph",
        "text": "Here are the inline elements in HTML:"
      },
      {
        "type": "code",
        "code": "<a>\n  <abbr>\n  <acronym>\n  <b>\n  <bdo>\n  <big>\n  <br>\n  <button>\n  <cite>\n  <code>\n  <dfn>\n  <em>\n  <i>\n  <img>\n  <input>\n  <kbd>\n  <label>\n  <map>\n  <object>\n  <output>  \n  <q>\n  <samp>\n  <script>\n  <select>\n  <small>\n  <span>\n  <strong>\n  <sub>\n  <sup>\n  <textarea>\n  <time>\n  <tt>\n  <var>"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> An inline element cannot contain a block-level \n  element!</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <div> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;div&gt;</code> element is \noften used as a container for other HTML elements."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;div&gt;</code> element has no required attributes, but <code class=\"w3-codespan\">style</code>, <code class=\"w3-codespan\">class</code> and <code class=\"w3-codespan\">id</code> are common."
      },
      {
        "type": "paragraph",
        "text": "When used together with CSS, the <code class=\"w3-codespan\">&lt;div&gt;</code> element can be used to style blocks of \ncontent:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<div style=\"background-color:black;color:white;padding:20px;\">\n   <h2>London</h2>  <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>\n </div>"
      },
      {
        "type": "paragraph",
        "text": "You will learn more about the <code class=\"w3-codespan\">&lt;div&gt;</code> element in the <a href=\"html_div.html\">next chapter</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <span> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;span&gt;</code> element is  \nan inline container used to mark up a part of a text, or a part of a document."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;span&gt;</code> element has no required attributes, but <code class=\"w3-codespan\">style</code>, <code class=\"w3-codespan\">class</code> and <code class=\"w3-codespan\">id</code> are common."
      },
      {
        "type": "paragraph",
        "text": "When used together with CSS, the <code class=\"w3-codespan\">&lt;span&gt;</code> element can be used to style parts of the text:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>My mother has <span style=\"color:blue;font-weight:bold;\">blue</span> eyes \n  and my father has <span style=\"color:darkolivegreen;font-weight:bold;\">dark \n  green</span> eyes.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "A block-level element always starts on a new line and takes up the full \n  width available",
          "An inline element does not start on a new line and it only takes up as \n  much width as necessary",
          "The <code class=\"w3-codespan\">&lt;div&gt;</code> element is a block-level \n  element and is often used as a container for other HTML elements",
          "The <code class=\"w3-codespan\">&lt;span&gt;</code> element is an inline \n  container used to mark up a part of a text, or a part of a document"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_div.html\">&lt;div&gt;</a>",
            "Defines a section in a document (block-level)"
          ],
          [
            "<a href=\"../tags/tag_span.html\">&lt;span&gt;</a>",
            "Defines a section in a document (inline)"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "classes": {
    "title": "HTML class Attribute",
    "blocks": [
      {
        "type": "intro",
        "text": "The HTML <code class=\"w3-codespan\">class</code> attribute is \nused to specify a class for an HTML element."
      },
      {
        "type": "intro",
        "text": "Multiple HTML elements can share the same class."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The class Attribute"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">class</code> attribute is often used to point \nto a class name in a style sheet. It can also be used by JavaScript to access and \nmanipulate elements with the specific class name."
      },
      {
        "type": "paragraph",
        "text": "In the following example we have three <code class=\"w3-codespan\">&lt;div&gt;</code> elements \nwith a <code class=\"w3-codespan\">class</code> attribute with the value of \n\"city\". All of the three <code class=\"w3-codespan\">&lt;div&gt;</code> \nelements will be styled equally according to the <code class=\"w3-codespan\">.city</code> \nstyle definition in the head section:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head><style>\n  .city {  background-color: tomato;  color: white;  \n  border: 2px solid black;  margin: 20px;\n    padding: 20px;} </style>\n </head><body><div class=\"city\">\n  \n <h2>London</h2>  <p>London is the capital of England.</p>\n </div><div class=\"city\">\n  \n <h2>Paris</h2>  <p>Paris is the capital of France.</p></div><div class=\"city\">\n  \n <h2>Tokyo</h2>  <p>Tokyo is the capital of Japan.</p></div></body></html>"
      },
      {
        "type": "paragraph",
        "text": "In the following example we have two <code class=\"w3-codespan\">&lt;span&gt;</code> elements \nwith a <code class=\"w3-codespan\">class</code> attribute with the value of \n\"note\". Both <code class=\"w3-codespan\">&lt;span&gt;</code> \nelements will be styled equally according to the <code class=\"w3-codespan\">.note</code> \nstyle definition in the head section:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head><style>.note {\n    font-size: 120%;  color: red;}\n </style></head><body><h1>My <span class=\"note\">Important</span> Heading</h1><p>This is some <span class=\"note\">important</span> text.</p></body></html>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> The <code class=\"w3-codespan\">class</code> attribute can be used on <strong>any</strong> HTML element.</p>\n  <p><strong>Note:</strong> The class name is case sensitive!</p>\n  <p><strong>Tip:</strong> You can learn much more about CSS in our <a href=\"../css/default.html\">CSS Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The Syntax For Class"
      },
      {
        "type": "paragraph",
        "text": "To create a class; write a period (.) character, followed by a \nclass name. \nThen, define the CSS properties within curly braces {}:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head><style>.city {  \n  background-color: tomato;  color: white;  padding: 10px;\n  }</style></head><body><h2 class=\"city\">London</h2>\n  <p>London is the capital of England.</p><h2 class=\"city\">Paris</h2>\n  <p>Paris is the capital of France.</p><h2 class=\"city\">Tokyo</h2>\n  <p>Tokyo is the capital of Japan.</p></body></html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Multiple Classes"
      },
      {
        "type": "paragraph",
        "text": "HTML elements can belong to more than one class."
      },
      {
        "type": "paragraph",
        "text": "To define multiple classes, separate the class names with a space, e.g. &lt;div \nclass=\"city main\"&gt;. The element will be styled according to all the \nclasses specified."
      },
      {
        "type": "paragraph",
        "text": "In the following example, the first <code class=\"w3-codespan\">&lt;h2&gt;</code> element belongs to both the <code class=\"w3-codespan\">\ncity</code> class and also to the <code class=\"w3-codespan\">main</code> class, \nand will get the CSS styles from both of the classes:&nbsp;"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h2 \n  class=\"city main\">London</h2><h2 class=\"city\">Paris</h2><h2 \n  class=\"city\">Tokyo</h2>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Different Elements Can Share Same Class"
      },
      {
        "type": "paragraph",
        "text": "Different HTML elements can point to the same class name."
      },
      {
        "type": "paragraph",
        "text": "In the following example, both <code class=\"w3-codespan\">&lt;h2&gt;</code> and <code class=\"w3-codespan\">&lt;p&gt;</code> \npoint to the \"city\" class \nand will share the same style:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h2 class=\"city\">Paris</h2><p \n  class=\"city\">Paris is the capital of France</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Use of the class Attribute in JavaScript"
      },
      {
        "type": "paragraph",
        "text": "The class name can also be used by JavaScript to perform certain tasks for \nspecific elements."
      },
      {
        "type": "paragraph",
        "text": "JavaScript can access elements with a specific class name with the <code class=\"w3-codespan\">getElementsByClassName()</code> method:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<script>function myFunction() {  var x = document.getElementsByClassName(\"city\");  for (var i = 0; i < x.length; \n  i++) {    x[i].style.display = \"none\";  }}</script>"
      },
      {
        "type": "note",
        "text": "<p>Don't worry if you don't understand the code in the example above.</p>\n<p>You will learn more about JavaScript in our <a href=\"#/html/scripts\">HTML JavaScript</a> chapter, or you can study our\n<a href=\"../js/default.html\">JavaScript Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "The HTML <code class=\"w3-codespan\">class</code> attribute specifies one or \nmore class names for an element",
          "Classes are used by CSS and JavaScript to select and access specific \n  elements",
          "The <code class=\"w3-codespan\">class</code> attribute can be used on any \n  HTML element",
          "The class name is case sensitive",
          "Different HTML elements can point to the same class name",
          "JavaScript can access elements with a specific class name with the <code class=\"w3-codespan\">getElementsByClassName()</code> \n  method"
        ]
      }
    ]
  },
  "id": {
    "title": "HTML id Attribute",
    "blocks": [
      {
        "type": "intro",
        "text": "The HTML <code class=\"w3-codespan\">id</code> attribute is used \nto specify a unique id for an HTML element."
      },
      {
        "type": "intro",
        "text": "You cannot have more than one element with the same id in an \nHTML document."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The id Attribute"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">id</code> attribute specifies a unique id \nfor an HTML element. The value of the <code class=\"w3-codespan\">id</code> \nattribute must be unique within the HTML document."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">id</code> attribute is used to point \nto a specific style declaration in a style sheet. It is also used by JavaScript to access and \nmanipulate the element with the specific id."
      },
      {
        "type": "paragraph",
        "text": "The syntax for id is: write a hash character (#), followed by an id name. \nThen, define the CSS properties within curly braces {}."
      },
      {
        "type": "paragraph",
        "text": "In the following example we have an <code class=\"w3-codespan\">&lt;h1&gt;</code> element that points to the \nid name \n\"myHeader\". This <code class=\"w3-codespan\">&lt;h1&gt;</code> \nelement will be styled according to the <code class=\"w3-codespan\">#myHeader</code> \nstyle definition in the head section:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head><style>#myHeader {  \n  background-color: lightblue;  color: black;  padding: 40px;  \n  text-align: center;} </style></head><body><h1 id=\"myHeader\">My \n  Header</h1></body></html>"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> The id name is case sensitive!</p>\n  <p><strong>Note:</strong> The id name must contain at least one \n  character, cannot start with a number, and must not contain whitespaces (spaces, tabs, \n  etc.).</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Difference Between Class and ID"
      },
      {
        "type": "paragraph",
        "text": "A \nclass name can be used by multiple HTML elements, while an id name must only be \nused by one HTML element \nwithin the page:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<style>/* Style the element with the id \"myHeader\" \n  */\n  #myHeader {  background-color: lightblue;  \n  color: black;  padding: \n  40px;  text-align: center;}/* Style all \n  elements with the class name \"city\" */.city\n  {  background-color: tomato;  color: white;  padding: 10px;} </style>\n  <!-- An element with a unique id --><h1 id=\"myHeader\">My \n  Cities</h1><!-- Multiple elements with same class --><h2 class=\"city\">London</h2><p>London is the capital of England.</p>\n  <h2 class=\"city\">Paris</h2><p>Paris is the capital of France.</p>\n  <h2 class=\"city\">Tokyo</h2><p>Tokyo is the capital of Japan.</p>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> You can learn much more about CSS in our <a href=\"../css/default.html\">CSS Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Bookmarks with ID and Links"
      },
      {
        "type": "paragraph",
        "text": "HTML bookmarks are used to allow readers to jump to specific parts of a webpage."
      },
      {
        "type": "paragraph",
        "text": "Bookmarks can be useful if your page is very long."
      },
      {
        "type": "paragraph",
        "text": "To use a bookmark, you must first create it, and then add a link \nto it."
      },
      {
        "type": "paragraph",
        "text": "Then, when the link is clicked, the page will scroll to the location with the \nbookmark."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Example"
      },
      {
        "type": "paragraph",
        "text": "First, create a bookmark with the <code class=\"w3-codespan\">id</code> attribute:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h2 id=\"C4\">Chapter 4</h2>"
      },
      {
        "type": "paragraph",
        "text": "Then, add a link to the bookmark (\"Jump to Chapter 4\"), from within the same page:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"#C4\">Jump to Chapter 4</a>"
      },
      {
        "type": "paragraph",
        "text": "Or, add a link to the bookmark (\"Jump to Chapter 4\"), from another page:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<a href=\"html_demo.html#C4\">Jump to Chapter 4</a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Using the id Attribute in JavaScript"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">id</code> attribute can also be used by JavaScript to perform \nsome tasks for that specific element."
      },
      {
        "type": "paragraph",
        "text": "JavaScript can access an element with a specific id with the <code class=\"w3-codespan\">getElementById()</code> method:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<script>function displayResult() {  document.getElementById(\"myHeader\").innerHTML = \"Have a nice day!\";}\n  </script>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> Study JavaScript in the <a href=\"#/html/scripts\">HTML JavaScript</a> chapter, or in our\n<a href=\"../js/default.html\">JavaScript Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "The <code class=\"w3-codespan\">id</code> attribute is used to specify a unique id \nfor an HTML element",
          "The value of the <code class=\"w3-codespan\">id</code> \nattribute must be unique within the HTML document",
          "The <code class=\"w3-codespan\">id</code> \n  attribute is used by CSS and JavaScript to style/select a specific element",
          "The value of the <code class=\"w3-codespan\">id</code> \n  attribute is case sensitive",
          "The <code class=\"w3-codespan\">id</code> \n  attribute is also used to create HTML bookmarks",
          "JavaScript can access an element with a specific id with the <code class=\"w3-codespan\">getElementById()</code> \n  method"
        ]
      }
    ]
  },
  "iframe": {
    "title": "HTML Iframes",
    "blocks": [
      {
        "type": "intro",
        "text": "An HTML iframe is used to display a web page within a web page."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Iframe Syntax"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;iframe&gt;</code> tag specifies an \ninline frame."
      },
      {
        "type": "paragraph",
        "text": "An inline frame is used to embed another document within the current HTML document."
      },
      {
        "type": "example",
        "title": "Syntax",
        "code": "<iframe src=\"url\" title=\"description\"></iframe>"
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> It is a good practice to always include a <code class=\"w3-codespan\">\ntitle</code> attribute for the <code class=\"w3-codespan\">&lt;iframe&gt;</code>. \nThis is used by screen readers to read out what the content of the iframe is."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Iframe - Set Height and Width"
      },
      {
        "type": "paragraph",
        "text": "Use the <code class=\"w3-codespan\">height</code> and <code class=\"w3-codespan\">width</code> attributes to specify the \nsize of the iframe."
      },
      {
        "type": "paragraph",
        "text": "The height and width are specified in pixels by default:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<iframe src=\"demo_iframe.htm\" height=\"200\" width=\"300\" \n  title=\"Iframe Example\"></iframe>"
      },
      {
        "type": "paragraph",
        "text": "Or you can add the <code class=\"w3-codespan\">style</code> attribute and use \nthe CSS <code class=\"w3-codespan\">height</code> and <code class=\"w3-codespan\">width</code> \nproperties:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<iframe src=\"demo_iframe.htm\" style=\"height:200px;width:300px;\" \n  title=\"Iframe Example\"></iframe>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Iframe - Remove the Border"
      },
      {
        "type": "paragraph",
        "text": "By default, an iframe has a border around it."
      },
      {
        "type": "paragraph",
        "text": "To remove the border, add the <code class=\"w3-codespan\">style</code> attribute and use the CSS \n<code class=\"w3-codespan\">border</code> property:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<iframe src=\"demo_iframe.htm\" style=\"border:none;\" \n  title=\"Iframe Example\"></iframe>"
      },
      {
        "type": "paragraph",
        "text": "With CSS, you can also change the size, style and color of the iframe's border:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<iframe src=\"demo_iframe.htm\" style=\"border:2px solid red;\" \n  title=\"Iframe Example\"></iframe>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Iframe - Target for a Link"
      },
      {
        "type": "paragraph",
        "text": "An iframe can be used as the target frame for a link."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">target</code> attribute \nof the link must refer to the <code class=\"w3-codespan\">name</code> attribute of the iframe:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<iframe src=\"demo_iframe.htm\" name=\"iframe_a\" title=\"Iframe \n  Example\"></iframe>\n <p><a href=\"https://www.codingtamilan.com\" target=\"iframe_a\">Coding Tamilan</a></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "The HTML <code class=\"w3-codespan\">&lt;iframe&gt;</code> tag specifies an \ninline frame",
          "The <code class=\"w3-codespan\">src</code> \nattribute defines the URL of the page to embed",
          "Always include a <code class=\"w3-codespan\">\ntitle</code> attribute (for screen readers)",
          "The <code class=\"w3-codespan\">height</code> and <code class=\"w3-codespan\">width</code> attributes specify the \nsize of the iframe",
          "Use <code class=\"w3-codespan\">border:none;</code> to remove the border \n  around the iframe"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML iframe Tag"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_iframe.html\">&lt;iframe&gt;</a>",
            "Defines an inline frame"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "scripts": {
    "title": "HTML JavaScript",
    "blocks": [
      {
        "type": "intro",
        "text": "JavaScript makes HTML pages more dynamic and interactive."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <script> Tag"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;script&gt;</code> tag is used to define a client-side script \n(JavaScript)."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;script&gt;</code> element either contains script statements, or it points to an \nexternal script file through the <code class=\"w3-codespan\">src</code> attribute."
      },
      {
        "type": "paragraph",
        "text": "Common uses for JavaScript are image manipulation, form validation, and \ndynamic changes of content."
      },
      {
        "type": "paragraph",
        "text": "To select an HTML element, JavaScript most often uses the \n<code class=\"w3-codespan\">document.getElementById()</code> method."
      },
      {
        "type": "paragraph",
        "text": "This JavaScript example writes \"Hello JavaScript!\" into an HTML element with id=\"demo\":"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<script>\n document.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n</script>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> You can learn much more about JavaScript in our <a href=\"../js/default.html\">JavaScript Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "A Taste of JavaScript"
      },
      {
        "type": "paragraph",
        "text": "Here are some examples of what JavaScript can do:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "document.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "document.getElementById(\"demo\").style.fontSize = \"25px\";document.getElementById(\"demo\").style.color = \"red\";document.getElementById(\"demo\").style.backgroundColor = \"yellow\";"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "document.getElementById(\"image\").src = \"picture.gif\";"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <noscript> Tag"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;noscript&gt;</code> tag defines an alternate content \nto be displayed to users that \nhave disabled scripts in their browser or have a browser that doesn't support \nscripts:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<script>\n document.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n</script><noscript>Sorry, your browser does not support JavaScript!</noscript>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Script Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_script.html\">&lt;script&gt;</a>",
            "Defines a client-side script"
          ],
          [
            "<a href=\"../tags/tag_noscript.html\">&lt;noscript&gt;</a>",
            "Defines an alternate content for users that do not support client-side \nscripts"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "filepaths": {
    "title": "HTML File Paths",
    "blocks": [
      {
        "type": "intro",
        "text": "A file path describes the location of a file in a web site's folder structure."
      },
      {
        "type": "header",
        "level": 2,
        "text": "File Path Examples"
      },
      {
        "type": "table",
        "headers": [
          "Path",
          "Description"
        ],
        "rows": [
          [
            "&lt;img src=\"picture.jpg\"&gt;",
            "The \"picture.jpg\" file is located in the same folder as the current page"
          ],
          [
            "&lt;img src=\"images/picture.jpg\"&gt;",
            "The \"picture.jpg\" file is located in the images folder in the current folder"
          ],
          [
            "&lt;img src=\"/images/picture.jpg\"&gt;",
            "The \"picture.jpg\" file is located in the images folder at the root of the current web"
          ],
          [
            "&lt;img src=\"../picture.jpg\"&gt;",
            "The \"picture.jpg\" file is located in the folder one level up from the current folder"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML File Paths"
      },
      {
        "type": "paragraph",
        "text": "A file path describes the location of a file in a web site's folder structure."
      },
      {
        "type": "paragraph",
        "text": "File paths are used when linking to external files, like:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Web pages",
          "Images",
          "Style sheets",
          "JavaScripts"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "Absolute File Paths"
      },
      {
        "type": "paragraph",
        "text": "An absolute file path is the full URL to a file:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"https://www.codingtamilan.com/images/picture.jpg\" \n  alt=\"Mountain\">"
      },
      {
        "type": "note",
        "text": "<p>The &lt;img&gt; tag is explained in the chapter: <a href=\"#/html/images\">HTML Images</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Relative File Paths"
      },
      {
        "type": "paragraph",
        "text": "A relative file path points to a file relative to the current page."
      },
      {
        "type": "paragraph",
        "text": "In the following example, the file path points to a file in the images folder located \nat the root of the current website:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"/images/picture.jpg\" \nalt=\"Mountain\">"
      },
      {
        "type": "paragraph",
        "text": "In the following example, the file path points to a file in the images folder located in the \ncurrent folder:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"images/picture.jpg\" \nalt=\"Mountain\">"
      },
      {
        "type": "paragraph",
        "text": "In the following example, the file path points to a file in the images folder located in the \nfolder one level up from the current folder:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img src=\"../images/picture.jpg\" \nalt=\"Mountain\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Best Practice"
      },
      {
        "type": "paragraph",
        "text": "It is best practice to use relative file paths (if possible)."
      },
      {
        "type": "paragraph",
        "text": "When using relative file paths, your web pages will not be bound to your current \nbase URL. All links will work on your own computer (localhost) as well as on \nyour current public domain and your future public domains."
      }
    ]
  },
  "head": {
    "title": "HTML - The Head Element",
    "blocks": [
      {
        "type": "intro",
        "text": "The HTML <code class=\"w3-codespan\">&lt;head&gt;</code> element\nis a container for the following elements:\n<code class=\"w3-codespan\">&lt;title&gt;</code>, <code class=\"w3-codespan\">&lt;style&gt;</code>, \n<code class=\"w3-codespan\">&lt;meta&gt;</code>, <code class=\"w3-codespan\">&lt;link&gt;</code>, <code class=\"w3-codespan\">&lt;script&gt;</code>, and <code class=\"w3-codespan\">&lt;base&gt;</code>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <head> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;head&gt;</code> element is a container for metadata (data \nabout data) and is placed between the <code class=\"w3-codespan\">&lt;html&gt;</code> tag and the <code class=\"w3-codespan\">&lt;body&gt;</code> tag."
      },
      {
        "type": "paragraph",
        "text": "HTML metadata is data about the HTML document. Metadata is not displayed on \nthe page."
      },
      {
        "type": "paragraph",
        "text": "Metadata typically define the document title, character set, styles, scripts, and other meta information."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <title> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;title&gt;</code> element defines the title of the document. \nThe title must be text-only, and it is shown in the browser's title bar or in \nthe page's tab."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;title&gt;</code> element is required in HTML documents!"
      },
      {
        "type": "paragraph",
        "text": "The content of a page title is very important for search engine optimization \n(SEO)! The page title is used by search engine algorithms to decide the order \nwhen listing pages in search results."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;title&gt;</code> element:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "defines a title in the browser toolbar",
          "provides a title for the page when it is added to favorites",
          "displays a title for the page in search engine-results"
        ]
      },
      {
        "type": "paragraph",
        "text": "So, try to make the title as accurate and meaningful as possible!"
      },
      {
        "type": "paragraph",
        "text": "A simple HTML document:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>\n<html><head>\n \n<title>A Meaningful Page \n Title</title>\n </head>\n<body>\n  The content of the document......\n  </body>\n</html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <style> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;style&gt;</code> element is used to define style information for a \nsingle HTML page:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<style>\n   \n  body {background-color: powderblue;}  h1 {color: red;}\n   \n  p {color: blue;}\n</style>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <link> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;link&gt;</code> element defines the \nrelationship between the current document and an external resource.<br><br>The <code class=\"w3-codespan\">&lt;link&gt;</code> \ntag is most often used to link to external style sheets:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<link rel=\"stylesheet\" href=\"mystyle.css\">"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> To learn all about CSS, visit our <a href=\"../css/default.html\">CSS Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <meta> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;meta&gt;</code> element is typically used \nto specify the character set, page description, keywords, author of the document, \nand viewport settings."
      },
      {
        "type": "paragraph",
        "text": "The metadata will not be displayed on the page, but is used by browsers (how to display content \nor reload page), \nby search engines (keywords), and other web services."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Examples"
      },
      {
        "type": "paragraph",
        "text": "<b>Define the character set used:</b>"
      },
      {
        "type": "code",
        "code": "<meta charset=\"UTF-8\">"
      },
      {
        "type": "paragraph",
        "text": "<b>Define keywords for search engines:</b>"
      },
      {
        "type": "code",
        "code": "<meta name=\"keywords\" content=\"HTML, CSS, JavaScript\">"
      },
      {
        "type": "paragraph",
        "text": "<b>Define a description of your web page:</b>"
      },
      {
        "type": "code",
        "code": "<meta name=\"description\" content=\"Free Web tutorials\">"
      },
      {
        "type": "paragraph",
        "text": "<b>Define the author of a page:</b>"
      },
      {
        "type": "code",
        "code": "<meta name=\"author\" content=\"John Doe\">"
      },
      {
        "type": "paragraph",
        "text": "<b>Refresh document every 30 seconds:</b>"
      },
      {
        "type": "code",
        "code": "<meta http-equiv=\"refresh\" content=\"30\">"
      },
      {
        "type": "paragraph",
        "text": "<b>Setting the viewport to make your website look good on all devices:</b>"
      },
      {
        "type": "code",
        "code": "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"
      },
      {
        "type": "paragraph",
        "text": "Example of <code class=\"w3-codespan\">&lt;meta&gt;</code> tags:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<meta charset=\"UTF-8\"><meta name=\"description\" content=\"Free Web tutorials\"><meta name=\"keywords\" content=\"HTML, CSS, JavaScript\"><meta name=\"author\" content=\"John \n  Doe\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Setting The Viewport"
      },
      {
        "type": "paragraph",
        "text": "The viewport is the user's visible area of a web page. It varies with the device \n- it will be smaller on a mobile phone than on a computer screen."
      },
      {
        "type": "paragraph",
        "text": "You should include the following <code class=\"w3-codespan\">&lt;meta&gt;</code> element in all your web pages:"
      },
      {
        "type": "code",
        "code": "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"
      },
      {
        "type": "paragraph",
        "text": "This gives the browser instructions on how \nto control the page's dimensions and scaling."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">width=device-width</code> part sets the width of the page to follow the screen-width of the device (which will vary depending on the device)."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">initial-scale=1.0</code> part sets the initial zoom level when the page is first loaded by the browser."
      },
      {
        "type": "paragraph",
        "text": "Here is an example of a web page <em>without</em> the viewport meta tag, and the same web page <em>with</em> the viewport meta tag:"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> If you are browsing this page with a phone or a tablet, you can click on the two links below to see the difference.</p>"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_viewport1.png",
        "alt": "HTML Image"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <script> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;script&gt;</code> element is used to define client-side JavaScripts."
      },
      {
        "type": "paragraph",
        "text": "The following JavaScript writes \"Hello JavaScript!\" into an HTML element with id=\"demo\":"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<script>function myFunction() {\n   \n document.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n }</script>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> To learn all about JavaScript, visit our <a href=\"../js/default.html\">JavaScript Tutorial</a>.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <base> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;base&gt;</code> element specifies the base URL and/or target for all relative URLs in a page."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;base&gt;</code> tag must have either an \nhref or a target attribute present, or both."
      },
      {
        "type": "paragraph",
        "text": "There can only be one single <code class=\"w3-codespan\">&lt;base&gt;</code> \nelement in a document!"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<head><base href=\"https://www.codingtamilan.com/\" target=\"_blank\"></head>\n   <body><img src=\"images/stickman.gif\" width=\"24\" height=\"39\" \n   alt=\"Stickman\"><a href=\"tags/tag_base.asp\">HTML base Tag</a></body>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "The <code class=\"w3-codespan\">&lt;head&gt;</code> element is a container for metadata (data \nabout data)",
          "The <code class=\"w3-codespan\">&lt;head&gt;</code> element is placed between the <code class=\"w3-codespan\">&lt;html&gt;</code> tag and the <code class=\"w3-codespan\">&lt;body&gt;</code> tag",
          "The <code class=\"w3-codespan\">&lt;title&gt;</code> element is required and \n  it defines the title of the document",
          "The <code class=\"w3-codespan\">&lt;style&gt;</code> element is used to \n  define style information for a single document",
          "The <code class=\"w3-codespan\">&lt;link&gt;</code> \n  tag is most often used to link to external style sheets",
          "The <code class=\"w3-codespan\">&lt;meta&gt;</code> element is typically \n  used to specify the character set, page description, keywords, author of the \n  document, and viewport settings",
          "The <code class=\"w3-codespan\">&lt;script&gt;</code> element is used to define client-side JavaScripts",
          "The <code class=\"w3-codespan\">&lt;base&gt;</code> element specifies the \n  base URL and/or target for all relative URLs in a page"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML head Elements"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_head.html\">&lt;head&gt;</a>",
            "Defines information about the document"
          ],
          [
            "<a href=\"../tags/tag_title.html\">&lt;title&gt;</a>",
            "Defines the title of a document"
          ],
          [
            "<a href=\"../tags/tag_base.html\">&lt;base&gt;</a>",
            "Defines a default address or a default target for all links on a page"
          ],
          [
            "<a href=\"../tags/tag_link.html\">&lt;link&gt;</a>",
            "Defines the relationship between a document and an external resource"
          ],
          [
            "<a href=\"../tags/tag_meta.html\">&lt;meta&gt;</a>",
            "Defines metadata about an HTML document"
          ],
          [
            "<a href=\"../tags/tag_script.html\">&lt;script&gt;</a>",
            "Defines a client-side script"
          ],
          [
            "<a href=\"../tags/tag_style.html\">&lt;style&gt;</a>",
            "Defines style information for a document"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "layout": {
    "title": "HTML Layout Elements and Techniques",
    "blocks": [
      {
        "type": "intro",
        "text": "Websites often display content in multiple columns (like a magazine or \na newspaper)."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Layout Elements"
      },
      {
        "type": "paragraph",
        "text": "HTML has several semantic elements that define the different parts of a web page:"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_sem_elements.gif",
        "alt": "HTML5 Semantic Elements"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_sem_elements.gif",
        "alt": "HTML5 Semantic Elements"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Layout Techniques"
      },
      {
        "type": "paragraph",
        "text": "There are four different techniques to create multicolumn layouts. Each \ntechnique has its pros and cons:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "CSS frameworks",
          "CSS float property",
          "CSS flexbox",
          "CSS grid"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Frameworks"
      },
      {
        "type": "paragraph",
        "text": "If you want to create your layout fast, you can use a CSS framework, like\n<a href=\"../w3css/default.html\">W3.CSS</a> or <a href=\"../bootstrap/default.html\">Bootstrap</a>."
      },
      {
        "type": "note",
        "text": "<p>Ever heard about <strong>Coding Tamilan Spaces</strong>? Here you can create your website from scratch or use a template.</p>\n  <a class=\"ws-btn\" href=\"https://www.codingtamilan.com/\" target=\"_blank\" title=\"Get Started With Coding Tamilan Spaces\">Get started for free ❯</a>\n  <p class=\"w3-small\"><em>* no credit card required</em></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Float Layout"
      },
      {
        "type": "paragraph",
        "text": "You can create entire web layouts using the CSS <code class=\"w3-codespan\">\nfloat</code> property. Float is easy to learn \n- you just need to remember how the <code class=\"w3-codespan\">float</code> and <code class=\"w3-codespan\">\nclear</code> properties work. \n<strong>Disadvantages:</strong> Floating elements are tied to the document flow, which may harm \nthe flexibility. Learn more about float in our <a href=\"../css/css_float.html\">CSS \nFloat and Clear</a> chapter."
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Flexbox Layout"
      },
      {
        "type": "paragraph",
        "text": "Use of flexbox ensures that elements behave predictably when the page layout \nmust accommodate different screen sizes and different display devices."
      },
      {
        "type": "paragraph",
        "text": "Learn more about flexbox in our\n<a href=\"../css/css3_flexbox.html\">CSS Flexbox</a> chapter."
      },
      {
        "type": "header",
        "level": 2,
        "text": "CSS Grid Layout"
      },
      {
        "type": "paragraph",
        "text": "The CSS Grid Layout Module offers a grid-based layout system, with rows and columns,\nmaking it easier to design web pages without having to use floats and positioning."
      },
      {
        "type": "paragraph",
        "text": "Learn more about CSS grids in our\n<a href=\"../css/css_grid.html\">CSS Grid Intro</a> chapter."
      }
    ]
  },
  "responsive": {
    "title": "HTML Responsive Web Design",
    "blocks": [
      {
        "type": "intro",
        "text": "Responsive web design is about creating web pages that look good on all devices!"
      },
      {
        "type": "intro",
        "text": "A responsive web design will automatically adjust for different screen sizes and viewports."
      },
      {
        "type": "image",
        "src": "assets/images/html/img_temp_band.jpg",
        "alt": "Responsive Web Design"
      },
      {
        "type": "header",
        "level": 2,
        "text": "What is Responsive Web Design?"
      },
      {
        "type": "paragraph",
        "text": "Responsive Web Design is about using HTML and CSS to automatically resize, hide, shrink, or enlarge,\na website, to make it look good on all devices (desktops, tablets, and phones):"
      },
      {
        "type": "paragraph",
        "text": "<a class=\"ws-btn w3-margin-bottom\" href=\"tryitffe9.html?filename=tryhtml_responsive_page\" target=\"_blank\">Try it Yourself »</a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Setting The Viewport"
      },
      {
        "type": "paragraph",
        "text": "To create a responsive website, add the following <code class=\"w3-codespan\">&lt;meta&gt;</code> \ntag to all your web pages:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"
      },
      {
        "type": "paragraph",
        "text": "This will set the viewport of your page, which will give the browser instructions on how \nto control the page's dimensions and scaling."
      },
      {
        "type": "paragraph",
        "text": "Here is an example of a web page <em>without</em> the viewport meta tag, and the same web page <em>with</em> the viewport meta tag:"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_viewport1.png",
        "alt": "HTML Image"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> If you are browsing this page on a phone or a tablet, you can click on the two links above to see the difference.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Responsive Images"
      },
      {
        "type": "paragraph",
        "text": "Responsive images are images that scale nicely to fit any browser size."
      },
      {
        "type": "header",
        "level": 3,
        "text": "Using the width Property"
      },
      {
        "type": "paragraph",
        "text": "If the CSS <code class=\"w3-codespan\">width</code> property is set to 100%, the image will be responsive and scale \nup and down:"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_girl.jpg",
        "alt": "HTML Image"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img \n  src=\"img_girl.jpg\" style=\"width:100%;\">"
      },
      {
        "type": "paragraph",
        "text": "Notice that in the example above, the image can be scaled up to be larger than its original size.\nA better solution, in many cases, will be to use the <code class=\"w3-codespan\">max-width</code> property instead."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Using the max-width Property"
      },
      {
        "type": "paragraph",
        "text": "If the <code class=\"w3-codespan\">max-width</code> property is set to 100%, the image will scale down if it has to, but never scale up to be larger than its original size:"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_girl.jpg",
        "alt": "HTML Image"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<img \n  src=\"img_girl.jpg\" style=\"max-width:100%;height:auto;\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Show Different Images Depending on Browser Width"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;picture&gt;</code> element allows you to define different images for \ndifferent browser window sizes."
      },
      {
        "type": "paragraph",
        "text": "Resize the browser window to see how the image below changes depending on the width:"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_smallflower.jpg",
        "alt": "Flowers"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<picture>  <source srcset=\"img_smallflower.jpg\" media=\"(max-width: \n  600px)\">  <source srcset=\"img_flowers.jpg\" media=\"(max-width: \n  1500px)\">  <source srcset=\"flowers.jpg\">  <img src=\"img_smallflower.jpg\" \n  alt=\"Flowers\"></picture>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Responsive Text Size"
      },
      {
        "type": "paragraph",
        "text": "The text size can be set with a \"vw\" unit, which means the \"viewport width\"."
      },
      {
        "type": "paragraph",
        "text": "That way the text size will follow the size of the browser window:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<h1 style=\"font-size:10vw\">Hello World</h1>"
      },
      {
        "type": "note",
        "text": "<p>Viewport is the browser window size. 1vw = 1% of viewport width. If the viewport is 50cm wide, 1vw is 0.5cm.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Media Queries"
      },
      {
        "type": "paragraph",
        "text": "In addition to resize text and images, it is also common to use media queries \nin responsive web pages."
      },
      {
        "type": "paragraph",
        "text": "With media queries you can define completely different styles for different browser \nsizes."
      },
      {
        "type": "paragraph",
        "text": "Example: resize the browser window to see that the three div elements below will display \nhorizontally on large screens and stack vertically on small screens:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<style>.left, .right {  float: left;  \n  width: 20%; /* The width is 20%, by default */}.main {  float: left;  width: 60%; /* The width is 60%, by default */}/* Use a media query to \n  add a breakpoint at 800px: */@media screen and (max-width: 800px) {  .left, \n  .main, .right {    \n  width: 100%; /* The width is 100%, when the viewport is 800px or smaller */  \n  }}</style>"
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> To learn more about Media Queries and Responsive Web Design, read our <a href=\"../css/css_rwd_intro.html\">RWD Tutorial</a>.<br></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Responsive Web Page - Full Example"
      },
      {
        "type": "paragraph",
        "text": "A responsive web page should look good on large desktop screens and on small mobile phones."
      },
      {
        "type": "paragraph",
        "text": "<a class=\"ws-btn w3-margin-top\" href=\"tryit9bb3.html?filename=tryhtml_responsive_media_query3\" target=\"_blank\">Try it Yourself »</a>"
      },
      {
        "type": "note",
        "text": "<p>Ever heard about <strong>Coding Tamilan Spaces</strong>? Here you can create your website from scratch or use a template.</p>\n  <a class=\"ws-btn\" href=\"https://www.codingtamilan.com/\" target=\"_blank\" title=\"Get Started With Coding Tamilan Spaces\">Get started for free ❯</a>\n  <p class=\"w3-small\"><em>* no credit card required</em></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Responsive Web Design - Frameworks"
      },
      {
        "type": "paragraph",
        "text": "All popular CSS Frameworks offer responsive design."
      },
      {
        "type": "paragraph",
        "text": "They are free, and easy to use."
      },
      {
        "type": "header",
        "level": 2,
        "text": "W3.CSS"
      },
      {
        "type": "paragraph",
        "text": "W3.CSS is a modern CSS framework with support for desktop, tablet, and mobile \ndesign by default."
      },
      {
        "type": "paragraph",
        "text": "W3.CSS is smaller and faster than similar CSS frameworks."
      },
      {
        "type": "paragraph",
        "text": "W3.CSS is designed to be independent of jQuery or any other JavaScript library."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html><head><title>W3.CSS</title><meta name=\"viewport\" \n content=\"width=device-width, initial-scale=1\"><link rel=\"stylesheet\" \n href=\"https://www.codingtamilan.com/w3css/4/w3.css\"></head><body><div \n class=\"w3-container w3-green\">  <h1>Coding Tamilan Demo</h1>   \n <p>Resize this responsive page!</p> </div><div \n class=\"w3-row-padding\">  <div class=\"w3-third\">    <h2>London</h2>    <p>London is the capital city of England.</p>    <p>It is the most populous city in the United Kingdom,    with a \n metropolitan area of over 13 million inhabitants.</p>  </div>  <div \n class=\"w3-third\">    <h2>Paris</h2>    <p>Paris is \n the capital of France.</p>     <p>The Paris area is one of the largest \n population centers in Europe,    with more than 12 million \n inhabitants.</p>  </div>  <div class=\"w3-third\">    \n <h2>Tokyo</h2>    <p>Tokyo is the capital of Japan.</p>    <p>It \n is the center of the Greater Tokyo Area,    and the most populous \n metropolitan area in the world.</p>  </div></div></body>\n </html>"
      },
      {
        "type": "paragraph",
        "text": "To learn more about W3.CSS, read our <a href=\"../w3css/default.html\">W3.CSS Tutorial</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Bootstrap"
      },
      {
        "type": "paragraph",
        "text": "Another popular CSS framework is Bootstrap:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html><html lang=\"en\"><head><title>Bootstrap 5 \n  Example</title><meta charset=\"utf-8\"><meta name=\"viewport\" \n  content=\"width=device-width, initial-scale=1\"><link \n  href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css\" \n  rel=\"stylesheet\"><script \n  src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js\"></script>\n  </head><body><div class=\"container-fluid p-5 bg-primary text-white \n  text-center\">  <h1>My First Bootstrap Page</h1>  <p>Resize \n  this responsive page to see the effect!</p> </div><div \n  class=\"container mt-5\">  <div class=\"row\">    <div \n  class=\"col-sm-4\">      <h3>Column 1</h3>      \n  <p>Lorem ipsum...</p>    </div>    <div \n  class=\"col-sm-4\">      <h3>Column 2</h3>      \n  <p>Lorem ipsum...</p>    </div>    <div \n  class=\"col-sm-4\">      <h3>Column 3</h3>       \n  <p>Lorem ipsum...</p>    </div>  </div></div>"
      },
      {
        "type": "paragraph",
        "text": "To learn more about Bootstrap, go to our <a href=\"../bootstrap/bootstrap_ver.html\">Bootstrap Tutorial</a>."
      }
    ]
  },
  "computercode": {
    "title": "HTML Computer Code Elements",
    "blocks": [
      {
        "type": "intro",
        "text": "HTML contains several elements for defining user input and \ncomputer code."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<code>x = 5;y = 6;\n  z = x + y;</code>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <kbd> For Keyboard Input"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;kbd&gt;</code> element is used \nto define keyboard input. The content inside is displayed in the browser's \ndefault monospace font."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>Save the document by pressing <kbd>Ctrl + S</kbd></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <samp> For Program Output"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;samp&gt;</code> element is used to \ndefine sample output from a computer program. The content inside is displayed in \nthe browser's default monospace font."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>Message from my computer:</p><p><samp>File not found.<br>Press F1 to \n  continue</samp></p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <code> For Computer Code"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;code&gt;</code> element&nbsp; is used \nto define a piece of computer code. The content inside is displayed in the \nbrowser's default monospace font."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<code>x = 5;y = 6;z = x + y;</code>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Preserve Line-Breaks"
      },
      {
        "type": "paragraph",
        "text": "Notice that the <code class=\"w3-codespan\">&lt;code&gt;</code> element does \nNOT preserve extra whitespace and line-breaks."
      },
      {
        "type": "paragraph",
        "text": "To preserve extra whitespace and line-breaks, you can put the <code class=\"w3-codespan\">&lt;code&gt;</code> element inside a <code class=\"w3-codespan\">&lt;pre&gt;</code> element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<pre><code>x = 5;y = 6;z = x + y;</code></pre>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <var> For Variables"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;var&gt;</code> element&nbsp; is used \nto define a variable in programming or in a mathematical expression. The \ncontent inside is typically displayed in italic."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>The area of a triangle is: 1/2 x <var>b</var> x <var>h</var>, where <var>b</var> \n  is the base, and <var>h</var> is the vertical height.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Chapter Summary"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "The <code class=\"w3-codespan\">&lt;kbd&gt;</code> element defines \nkeyboard input",
          "The <code class=\"w3-codespan\">&lt;samp&gt;</code> element defines \n  sample output from a computer program",
          "The <code class=\"w3-codespan\">&lt;code&gt;</code> element&nbsp;defines a piece of computer code",
          "The <code class=\"w3-codespan\">&lt;var&gt;</code> element&nbsp;defines a variable in programming or in a mathematical expression",
          "The <code class=\"w3-codespan\">&lt;pre&gt;</code> element defines \n  preformatted text"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Computer Code Elements"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_code.html\">&lt;code&gt;</a>",
            "Defines programming code"
          ],
          [
            "<a href=\"../tags/tag_kbd.html\">&lt;kbd&gt;</a>",
            "Defines keyboard input&nbsp;"
          ],
          [
            "<a href=\"../tags/tag_samp.html\">&lt;samp&gt;</a>",
            "Defines computer output"
          ],
          [
            "<a href=\"../tags/tag_var.html\">&lt;var&gt;</a>",
            "Defines a variable"
          ],
          [
            "<a href=\"../tags/tag_pre.html\">&lt;pre&gt;</a>",
            "Defines preformatted text"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "semantic": {
    "title": "HTML Semantic Elements",
    "blocks": [
      {
        "type": "intro",
        "text": "Semantic elements = elements with a meaning."
      },
      {
        "type": "header",
        "level": 2,
        "text": "What are Semantic Elements?"
      },
      {
        "type": "paragraph",
        "text": "A semantic element clearly describes its meaning to both the browser and the developer."
      },
      {
        "type": "paragraph",
        "text": "Examples of <strong>non-semantic</strong> elements: <code class=\"w3-codespan\">&lt;div&gt;</code> and <code class=\"w3-codespan\">&lt;span&gt;</code> - Tells nothing about its content."
      },
      {
        "type": "paragraph",
        "text": "Examples of <strong>semantic</strong> elements: <code class=\"w3-codespan\">&lt;img&gt;</code>, <code class=\"w3-codespan\">&lt;table&gt;</code>, and <code class=\"w3-codespan\">&lt;article&gt;</code> - Clearly defines its content."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Semantic Elements in HTML"
      },
      {
        "type": "paragraph",
        "text": "Many web sites contain HTML code like:\n&lt;div id=\"nav\"&gt; &lt;div class=\"header\"&gt; &lt;div id=\"footer\"&gt;\nto indicate navigation, header, and footer."
      },
      {
        "type": "paragraph",
        "text": "In HTML there are several semantic elements that can be used to define different parts of a web page:\n&nbsp;"
      },
      {
        "type": "image",
        "src": "assets/images/html/img_sem_elements.gif",
        "alt": "HTML Semantic Elements"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <section> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;section&gt;</code> element defines a section in a document."
      },
      {
        "type": "paragraph",
        "text": "According to W3C's HTML documentation: \"A section is a thematic grouping of content, typically with a heading.\""
      },
      {
        "type": "paragraph",
        "text": "Examples of where a <code class=\"w3-codespan\">&lt;section&gt;</code> element can be used:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Chapters",
          "Introduction",
          "News items",
          "Contact information"
        ]
      },
      {
        "type": "paragraph",
        "text": "A web page could normally be split into sections for introduction, \ncontent, and contact information."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<section><h1>WWF</h1><p>The World Wide Fund for Nature (WWF) is an \n    international organization working on issues regarding the conservation, \n    research and restoration of the environment, formerly named the World \n    Wildlife Fund. WWF was founded in 1961.</p></section><section>\n    <h1>WWF's Panda symbol</h1><p>The Panda has become the symbol of WWF. \n    The well-known panda logo of WWF originated from a panda named Chi Chi that \n    was transferred from the Beijing Zoo to the London Zoo in the same year of \n    the establishment of WWF.</p></section>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <article> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;article&gt;</code> element specifies independent, self-contained content."
      },
      {
        "type": "paragraph",
        "text": "An article should make sense on its own, and it should be possible to \ndistribute it independently from the rest of the web site."
      },
      {
        "type": "paragraph",
        "text": "Examples of where the <code class=\"w3-codespan\">&lt;article&gt;</code> element can be used:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Forum posts",
          "Blog posts",
          "User comments",
          "Product cards",
          "Newspaper articles"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<article><h2>Google Chrome</h2><p>Google Chrome is a web browser \n    developed by Google, released in 2008. Chrome is the world's most popular \n    web browser today!</p></article><article><h2>Mozilla \n    Firefox</h2><p>Mozilla Firefox is an open-source web browser developed \n    by Mozilla. Firefox has been the second most popular web browser since \n    January, 2018.</p></article><article><h2>Microsoft Edge</h2>\n    <p>Microsoft Edge is a web browser developed by Microsoft, released in 2015. \n    Microsoft Edge replaced Internet Explorer.</p></article>"
      },
      {
        "type": "example",
        "title": "Example 2",
        "code": "<html><head><style>.all-browsers {  margin: 0;  \n  padding: 5px;  background-color: lightgray;}.all-browsers \n  > h1, .browser {  margin: 10px;  padding: 5px;}\n  .browser {  background: white;}.browser > h2,  \n  p {  margin: 4px;  font-size: 90%;}</style>\n  </head><body><article class=\"all-browsers\">  <h1>Most \n  Popular Browsers</h1>  <article class=\"browser\">    \n  <h2>Google Chrome</h2>    <p>Google Chrome is a web browser \n  developed by Google, released in 2008. Chrome is the world's most popular web \n  browser today!</p>  </article>  <article class=\"browser\">    \n  <h2>Mozilla Firefox</h2>    <p>Mozilla Firefox is an \n  open-source web browser developed by Mozilla. Firefox has been the second most \n  popular web browser since January, 2018.</p>  </article>  \n  <article class=\"browser\">    <h2>Microsoft Edge</h2>    \n  <p>Microsoft Edge is a web browser developed by Microsoft, released in 2015. \n  Microsoft Edge replaced Internet Explorer.</p>  </article>\n  </article></body></html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Nesting <article> in <section> or Vice Versa?"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;article&gt;</code> \nelement specifies independent, self-contained content."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;section&gt;</code> element defines a section in a document."
      },
      {
        "type": "paragraph",
        "text": "Can we use the definitions to decide how to nest those elements? No, we cannot!"
      },
      {
        "type": "paragraph",
        "text": "So, you will find HTML pages with <code class=\"w3-codespan\">&lt;section&gt;</code> elements \ncontaining <code class=\"w3-codespan\">&lt;article&gt;</code> elements, and <code class=\"w3-codespan\">&lt;article&gt;</code> elements containing <code class=\"w3-codespan\">&lt;section&gt;</code> elements."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <header> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;header&gt;</code> element represents a container for introductory content or \na set of navigational links."
      },
      {
        "type": "paragraph",
        "text": "A <code class=\"w3-codespan\">&lt;header&gt;</code> element typically contains:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "one or more heading elements (&lt;h1&gt; - &lt;h6&gt;)",
          "logo or icon",
          "authorship information"
        ]
      },
      {
        "type": "paragraph",
        "text": "<b>Note:</b> You can have several <code class=\"w3-codespan\">&lt;header&gt;</code> elements in one \nHTML document. However, <code class=\"w3-codespan\">&lt;header&gt;</code> cannot be placed within a <code class=\"w3-codespan\">&lt;footer&gt;</code>, <code class=\"w3-codespan\">&lt;address&gt;</code> or another <code class=\"w3-codespan\">&lt;header&gt;</code> element."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<article>\n  <header>\n    \n <h1>What Does WWF Do?</h1>\n    <p>WWF's mission:</p>\n  </header>\n   <p>WWF's mission is to stop the degradation of our planet's natural environment,  and build a future in which humans live in harmony with nature.</p>\n </article>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <footer> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;footer&gt;</code> element defines a footer for a document or section."
      },
      {
        "type": "paragraph",
        "text": "A <code class=\"w3-codespan\">&lt;footer&gt;</code> element typically contains:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "authorship information",
          "copyright \ninformation",
          "contact information",
          "sitemap",
          "back to top links",
          "related documents"
        ]
      },
      {
        "type": "paragraph",
        "text": "You can have several <code class=\"w3-codespan\">&lt;footer&gt;</code> elements in one document."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<footer>\n  <p>Author: Hege Refsnes</p>\n  <p><a href=\"mailto:hege@example.com\">hege@example.com</a></p>\n </footer>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <nav> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;nav&gt;</code> element defines a set of navigation links."
      },
      {
        "type": "note",
        "text": "<p>Notice that NOT all links of a document should be inside a <code class=\"w3-codespan\">&lt;nav&gt;</code> element. The \n<code class=\"w3-codespan\">&lt;nav&gt;</code> element is intended only for major blocks of navigation links. </p>\n  <p>Browsers, such as screen readers for disabled users, can use this element \n  to determine whether to omit the initial rendering of this content.</p>"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<nav>\n  \n <a href=\"/html/\">HTML</a> |\n  \n <a href=\"/css/\">CSS</a> |\n  \n <a href=\"/js/\">JavaScript</a> |\n  \n <a href=\"/jquery/\">jQuery</a>\n </nav>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <aside> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;aside&gt;</code> element defines some content aside from the content it is \nplaced in (like a sidebar)."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;aside&gt;</code> content should be \nindirectly related to the surrounding content."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>My family and I visited The Epcot center this summer. The weather was \n    nice, and Epcot was amazing! I had a great summer together with my \n    family!</p><aside><h4>Epcot Center</h4><p>Epcot is a theme \n    park at Walt Disney World Resort featuring exciting attractions, \n    international pavilions, award-winning fireworks and seasonal special \n    events.</p></aside>"
      },
      {
        "type": "example",
        "title": "Example 2",
        "code": "<html><head><style>aside {  width: 30%;  \n  padding-left: 15px;  margin-left: 15px;  float: right;  \n  font-style: italic;  background-color: lightgray;}</style></head><body>\n  <p>My family and I visited The Epcot \n  center this summer. The weather was nice, and Epcot was amazing! I had a great \n  summer together with my family!</p><aside><p>The Epcot center is a \n  theme park at Walt Disney World Resort featuring exciting attractions, \n  international pavilions, award-winning fireworks and seasonal special \n  events.</p></aside><p>My family and I visited The Epcot center \n  this summer. The weather was nice, and Epcot was amazing! I had a great summer \n  together with my family!</p><p>My family and I visited The Epcot center \n  this summer. The weather was nice, and Epcot was amazing! I had a great summer \n  together with my family!</p></body></html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <figure> and <figcaption> Elements"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;figure&gt;</code> tag specifies self-contained content, like illustrations, diagrams, photos, code listings, etc."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;figcaption&gt;</code> tag defines a caption for a <code class=\"w3-codespan\">&lt;figure&gt;</code> element. The <code class=\"w3-codespan\">&lt;figcaption&gt;</code> element can be placed as the first or \nas the last child of a <code class=\"w3-codespan\">&lt;figure&gt;</code> element."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;img&gt;</code> element defines the actual image/illustration.&nbsp;"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<figure>\n  <img src=\"pic_trulli.jpg\" alt=\"Trulli\">\n  <figcaption>Fig1. - Trulli, Puglia, Italy.</figcaption>\n</figure>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Why Semantic Elements?"
      },
      {
        "type": "paragraph",
        "text": "According to the W3C: \"A semantic Web allows data to be shared and reused across applications, \nenterprises, and communities.\""
      },
      {
        "type": "header",
        "level": 2,
        "text": "Semantic Elements in HTML"
      },
      {
        "type": "paragraph",
        "text": "Below is a list of some of the semantic elements in HTML."
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_article.html\">&lt;article&gt;</a>",
            "Defines independent, self-contained content"
          ],
          [
            "<a href=\"../tags/tag_aside.html\">&lt;aside&gt;</a>",
            "Defines content aside from the page content"
          ],
          [
            "<a href=\"../tags/tag_details.html\">&lt;details&gt;</a>",
            "Defines additional details that the user can view or hide"
          ],
          [
            "<a href=\"../tags/tag_figcaption.html\">&lt;figcaption&gt;</a>",
            "Defines a caption for a &lt;figure&gt; element"
          ],
          [
            "<a href=\"../tags/tag_figure.html\">&lt;figure&gt;</a>",
            "Specifies self-contained content, like illustrations, diagrams, photos, code \nlistings, etc."
          ],
          [
            "<a href=\"../tags/tag_footer.html\">&lt;footer&gt;</a>",
            "Defines a footer for a document or section"
          ],
          [
            "<a href=\"../tags/tag_header.html\">&lt;header&gt;</a>",
            "Specifies a header for a document or section"
          ],
          [
            "<a href=\"../tags/tag_main.html\">&lt;main&gt;</a>",
            "Specifies the main content of a document"
          ],
          [
            "<a href=\"../tags/tag_mark.html\">&lt;mark&gt;</a>",
            "Defines marked/highlighted text"
          ],
          [
            "<a href=\"../tags/tag_nav.html\">&lt;nav&gt;</a>",
            "Defines navigation links"
          ],
          [
            "<a href=\"../tags/tag_section.html\">&lt;section&gt;</a>",
            "Defines a section in a document"
          ],
          [
            "<a href=\"../tags/tag_summary.html\">&lt;summary&gt;</a>",
            "Defines a visible heading for a &lt;details&gt; element"
          ],
          [
            "<a href=\"../tags/tag_time.html\">&lt;time&gt;</a>",
            "Defines a date/time"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "entities": {
    "title": "HTML Entities",
    "blocks": [
      {
        "type": "intro",
        "text": "Reserved characters in HTML must be replaced with entities:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "&lt; (less than) = <b>&amp;lt;</b>",
          "&gt; (greater than) = <b>&amp;gt;</b>"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Character Entities"
      },
      {
        "type": "paragraph",
        "text": "Some characters are reserved in HTML."
      },
      {
        "type": "paragraph",
        "text": "If you use the less than (&lt;) or greater than (&gt;) signs in your HTML text, the browser might mix them with tags."
      },
      {
        "type": "paragraph",
        "text": "Entity names or entity numbers can be used to display reserved HTML characters."
      },
      {
        "type": "paragraph",
        "text": "Entity names look like this:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "&entity_name;"
      },
      {
        "type": "paragraph",
        "text": "Entity numbers look like this:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "&#entity_number;"
      },
      {
        "type": "paragraph",
        "text": "To display a less than sign (&lt;) we must write: <b>&amp;lt;</b> or <b>&amp;#60;</b>"
      },
      {
        "type": "note",
        "text": "<p><b>Entity names</b> are easier to remember than entity numbers.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Non-breaking Space"
      },
      {
        "type": "paragraph",
        "text": "A commonly used HTML entity is the non-breaking space: <strong>&amp;nbsp;</strong>"
      },
      {
        "type": "paragraph",
        "text": "A non-breaking space is a space that will not break into a new line."
      },
      {
        "type": "paragraph",
        "text": "Two words \nseparated by a non-breaking space will stick together (not break into a new \nline). This \nis handy when breaking the words might be disruptive."
      },
      {
        "type": "paragraph",
        "text": "Examples:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "§ 10",
          "10 km/h",
          "10 PM"
        ]
      },
      {
        "type": "paragraph",
        "text": "Another common use of the non-breaking space is to prevent browsers from truncating spaces in HTML pages."
      },
      {
        "type": "paragraph",
        "text": "If you write 10 spaces in your text, the browser will remove 9 of them. To add real spaces to your text, \nyou can use the <strong>&amp;nbsp;</strong> character entity."
      },
      {
        "type": "note",
        "text": "<p>The non-breaking hyphen (<a href=\"../charsets/ref_utf_punctuation.html\">&amp;#8209;</a>) \nis used to define a hyphen character (‑) that does not break into a new \nline.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Some Useful HTML Character Entities"
      },
      {
        "type": "table",
        "headers": [
          "Result",
          "Description",
          "Name",
          "Number",
          ""
        ],
        "rows": [
          [
            "",
            "non-breaking space",
            "&amp;nbsp;",
            "&amp;#160;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit4b7b.html?filename=tryhtml_ent_nbsp\">Try it »</a>"
          ],
          [
            "&lt;",
            "less than",
            "&amp;lt;",
            "&amp;#60;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit8d43.html?filename=tryhtml_ent_lt\">Try it »</a>"
          ],
          [
            "&gt;",
            "greater than",
            "&amp;gt;",
            "&amp;#62;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryita8f9.html?filename=tryhtml_ent_gt\">Try it »</a>"
          ],
          [
            "&amp;",
            "ampersand",
            "&amp;amp;",
            "&amp;#38;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryita10d.html?filename=tryhtml_ent_amp\">Try it »</a>"
          ],
          [
            "\"",
            "double quotation mark",
            "&amp;quot;",
            "&amp;#34;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit5a20.html?filename=tryhtml_ent_quot\">Try it »</a>"
          ],
          [
            "'",
            "single quotation mark",
            "&amp;apos;",
            "&amp;#39;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit8543.html?filename=tryhtml_ent_apos\">Try it »</a>"
          ],
          [
            "¢",
            "cent",
            "&amp;cent;",
            "&amp;#162;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit76ce.html?filename=tryhtml_ent_cent\">Try it »</a>"
          ],
          [
            "£",
            "pound",
            "&amp;pound;",
            "&amp;#163;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryite007.html?filename=tryhtml_ent_pound\">Try it »</a>"
          ],
          [
            "¥",
            "yen",
            "&amp;yen;",
            "&amp;#165;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit4f4a.html?filename=tryhtml_ent_yen\">Try it »</a>"
          ],
          [
            "€",
            "euro",
            "&amp;euro;",
            "&amp;#8364;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit7a7e.html?filename=tryhtml_ent_euro\">Try it »</a>"
          ],
          [
            "©",
            "copyright",
            "&amp;copy;",
            "&amp;#169;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryitb41f.html?filename=tryhtml_ent_copy\">Try it »</a>"
          ],
          [
            "®",
            "registered trademark",
            "&amp;reg;",
            "&amp;#174;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryita100.html?filename=tryhtml_ent_reg\">Try it »</a>"
          ],
          [
            "™",
            "trademark",
            "&amp;trade;",
            "&amp;#8482;",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit57bb.html?filename=tryhtml_ent_trad\">Try it »</a>"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<h2>Note</h2>\n<p>Entity names are case sensitive.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Combining Diacritical Marks"
      },
      {
        "type": "paragraph",
        "text": "A diacritical mark is a \"glyph\" added to a letter."
      },
      {
        "type": "paragraph",
        "text": "Some diacritical marks, like grave (&nbsp; ̀) and acute (&nbsp; ́) are called accents."
      },
      {
        "type": "paragraph",
        "text": "Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in \nthe character set (encoding) used in the page."
      },
      {
        "type": "paragraph",
        "text": "Here are some examples:"
      },
      {
        "type": "table",
        "headers": [
          "Mark",
          "Character",
          "Construct",
          "Result",
          ""
        ],
        "rows": [
          [
            "&nbsp;̀",
            "a",
            "a&amp;#768;",
            "à",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit8bec.html?filename=tryhtml_ent_a768\">Try it »</a>"
          ],
          [
            "&nbsp;́",
            "a",
            "a&amp;#769;",
            "á",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryitaaa0.html?filename=tryhtml_ent_a769\">Try it »</a>"
          ],
          [
            "̂",
            "a",
            "a&amp;#770;",
            "â",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit3960.html?filename=tryhtml_ent_a770\">Try it »</a>"
          ],
          [
            "&nbsp;̃",
            "a",
            "a&amp;#771;",
            "ã",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit7735.html?filename=tryhtml_ent_a771\">Try it »</a>"
          ],
          [
            "&nbsp;̀",
            "O",
            "O&amp;#768;",
            "Ò",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryitedd7.html?filename=tryhtml_ent_o768\">Try it »</a>"
          ],
          [
            "&nbsp;́",
            "O",
            "O&amp;#769;",
            "Ó",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryitb2e3.html?filename=tryhtml_ent_o769\">Try it »</a>"
          ],
          [
            "̂",
            "O",
            "O&amp;#770;",
            "Ô",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryite4f7.html?filename=tryhtml_ent_o770\">Try it »</a>"
          ],
          [
            "&nbsp;̃",
            "O",
            "O&amp;#771;",
            "Õ",
            "<a target=\"_blank\" class=\"w3-btn btnsmall\" href=\"tryit8457.html?filename=tryhtml_ent_o771\">Try it »</a>"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>There are more examples in the next chapter.</p>"
      }
    ]
  },
  "symbols": {
    "title": "HTML Symbols",
    "blocks": [
      {
        "type": "example",
        "title": "Example",
        "code": "<p>I will display &euro;</p>\n<p>I will display &#8364;</p>\n<p>I will display &#x20AC;</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Some HTML Symbol Entities"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Some HTML Mathematical Entities"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Some HTML Greek Letters Entities"
      },
      {
        "type": "header",
        "level": 2,
        "text": "More Symbols"
      }
    ]
  },
  "emojis": {
    "title": "Using Emojis in HTML",
    "blocks": [
      {
        "type": "header",
        "level": 2,
        "text": "HTML Emojis Examples"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML charset Attribute"
      },
      {
        "type": "paragraph",
        "text": "To display an HTML page correctly, a web browser must know the character set used in the page."
      },
      {
        "type": "paragraph",
        "text": "This is specified in the <code class=\"w3-codespan\">&lt;meta&gt;</code> tag:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<meta charset=\"UTF-8\">"
      },
      {
        "type": "note",
        "text": "<p>If not specified, UTF-8 is the default character set in HTML.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "UTF-8 Characters"
      },
      {
        "type": "paragraph",
        "text": "Many UTF-8 characters cannot be typed on a keyboard,\nbut they can always be displayed using numbers (called entity numbers):"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "A is 65",
          "B is 66",
          "C is 67"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>\n<html>\n<meta charset=\"UTF-8\">\n<body>\n<p>I will display A B C</p>\n<p>I will display &#65; &#66; &#67;</p>\n</body>\n</html>"
      },
      {
        "type": "header",
        "level": 3,
        "text": "Example Explained"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;meta charset=\"UTF-8\"&gt;</code> element defines the character set."
      },
      {
        "type": "paragraph",
        "text": "The characters A, B, and C, are displayed by the numbers 65, 66, and 67."
      },
      {
        "type": "paragraph",
        "text": "To let the browser understand that you are displaying a character, you must start the entity number\nwith &amp;# and end it with ; (semicolon)."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Emoji Characters"
      },
      {
        "type": "paragraph",
        "text": "Emojis are also characters from the UTF-8 alphabet:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "😄 is 128516",
          "😍 is 128525",
          "💗 is 128151"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>\n<html>\n<meta charset=\"UTF-8\">\n<body>\n<h1>My First Emoji</h1>\n<p>&#128512;</p>\n</body></html>"
      },
      {
        "type": "paragraph",
        "text": "Since Emojis are characters, they can be copied, displayed,\nand sized just like any other character in HTML."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html>\n<html>\n<meta charset=\"UTF-8\">\n<body>\n<h1>Sized Emojis</h1>\n  <p style=\"font-size:48px\">&#128512; &#128516; &#128525; &#128151;</p>\n</body></html>"
      }
    ]
  },
  "charset": {
    "title": "HTML Encoding (Character Sets)",
    "blocks": [
      {
        "type": "paragraph",
        "text": "The HTML specification encourages web developers to use the UTF-8 character set."
      },
      {
        "type": "paragraph",
        "text": "UTF-8 covers almost all of the characters and symbols in the world!"
      },
      {
        "type": "image",
        "src": "assets/images/html/unicode_web.jpg",
        "alt": "Unicode Web growth"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The ASCII Character Set"
      },
      {
        "type": "paragraph",
        "text": "<b>ASCII was the first</b> character encoding standard for the web."
      },
      {
        "type": "paragraph",
        "text": "It defined <b>128 different latin characters</b> that could be used on the internet:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "English letters (a-z and A-Z)",
          "Numbers (0-9)",
          "Some special characters: ! $ + - ( ) @ &lt; &gt; . # ?"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "The ANSI Character Set"
      },
      {
        "type": "paragraph",
        "text": "ANSI (Windows-1252) was the <b>first Windows character set</b>:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Identical to ASCII for the first 127 characters",
          "Special characters from 128 to 159",
          "Identical to UTF-8 from 160 to 255"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<meta charset=\"Windows-1252\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The ISO-8859-1 Character Set"
      },
      {
        "type": "paragraph",
        "text": "The default character set for <b>HTML 4 was ISO-8859-1</b>."
      },
      {
        "type": "paragraph",
        "text": "It <b>supported 256 characters</b>:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Identical to ASCII for the first 127 characters",
          "Does not use the characters from 128 to 159",
          "Identical to ANSI and UTF-8 from 160 to 255"
        ]
      },
      {
        "type": "example",
        "title": "HTML 4 Example",
        "code": "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=ISO-8859-1\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The UTF-8 Character Set"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Identical to ASCII for the values from 0 to 127",
          "Does not use the characters from 128 to 159",
          "Identical to ANSI and 8859-1 from 160 to 255",
          "Continues from the value 256 to 10 000 characters"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<meta charset=\"UTF-8\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML UTF-8 Characters"
      }
    ]
  },
  "urlencode": {
    "title": "HTML Uniform Resource Locators",
    "blocks": [
      {
        "type": "intro",
        "text": "A URL is another word for a web address."
      },
      {
        "type": "intro",
        "text": "A URL can be composed of words (e.g. codingtamilan.com), or an Internet Protocol (IP) address (e.g. 192.68.20.50)."
      },
      {
        "type": "intro",
        "text": "Most people enter the name when surfing, because names are easier to remember than numbers."
      },
      {
        "type": "header",
        "level": 2,
        "text": "URL - Uniform Resource Locator"
      },
      {
        "type": "paragraph",
        "text": "Web browsers request pages from web servers by using a URL."
      },
      {
        "type": "paragraph",
        "text": "A Uniform Resource Locator (URL) is used to address a document (or other data) on the web."
      },
      {
        "type": "paragraph",
        "text": "A web address like <a target=\"_blank\" href=\"#/html/intro\">\nhttps://www.codingtamilan.com/html/default.asp</a> follows these syntax rules:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "scheme://prefix.domain:port/path/filename"
      },
      {
        "type": "paragraph",
        "text": "Explanation:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "<b>scheme</b> - defines the <b>type</b> of Internet service (most common is <b>http or https</b>)",
          "<strong>prefix</strong> - defines a domain <b>prefix</b> (default for http is <b>www</b>)",
          "<b>domain</b> - defines the Internet <b>domain name </b>(like codingtamilan.com)",
          "<b>port</b> - defines the <b>port number </b>at the host (default for http is <b>80</b>)",
          "<b>path</b> - defines a <b>path</b> at the server (If omitted: the root directory of the site)",
          "<b>filename</b> - defines the name of a document or resource"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "Common URL Schemes"
      },
      {
        "type": "paragraph",
        "text": "The table below lists some common schemes:"
      },
      {
        "type": "table",
        "headers": [
          "Scheme",
          "Short for",
          "Used for"
        ],
        "rows": [
          [
            "http",
            "HyperText Transfer Protocol",
            "Common web pages. Not encrypted"
          ],
          [
            "https",
            "Secure HyperText Transfer Protocol",
            "Secure web pages. Encrypted"
          ],
          [
            "ftp",
            "File Transfer Protocol",
            "Downloading or uploading files"
          ],
          [
            "file",
            "&nbsp;",
            "A file on your computer"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "URL Encoding"
      },
      {
        "type": "paragraph",
        "text": "URLs can only be sent over the Internet using the\n<a href=\"../charsets/ref_html_ascii.html\">ASCII character-set</a>. If a URL contains characters outside the ASCII set, the URL has to be \nconverted."
      },
      {
        "type": "paragraph",
        "text": "URL encoding converts non-ASCII characters into a format that can be transmitted over the Internet."
      },
      {
        "type": "paragraph",
        "text": "URL encoding replaces non-ASCII characters with a \"%\" followed by hexadecimal digits."
      },
      {
        "type": "paragraph",
        "text": "URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign, or %20."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Try It Yourself"
      },
      {
        "type": "paragraph",
        "text": "If you click \"Submit\", the browser will URL encode the input before it is sent to the server."
      },
      {
        "type": "paragraph",
        "text": "A page at the server will display the received input."
      },
      {
        "type": "paragraph",
        "text": "Try some other input and click Submit again."
      },
      {
        "type": "header",
        "level": 2,
        "text": "ASCII Encoding Examples"
      },
      {
        "type": "paragraph",
        "text": "Your browser will encode input, according to the character-set used in your page."
      },
      {
        "type": "paragraph",
        "text": "The default character-set in HTML5 is UTF-8."
      },
      {
        "type": "table",
        "headers": [
          "Character",
          "From Windows-1252",
          "From UTF-8"
        ],
        "rows": [
          [
            "€",
            "%80",
            "%E2%82%AC"
          ],
          [
            "£",
            "%A3",
            "%C2%A3"
          ],
          [
            "©",
            "%A9",
            "%C2%A9"
          ],
          [
            "®",
            "%AE",
            "%C2%AE"
          ],
          [
            "À",
            "%C0",
            "%C3%80"
          ],
          [
            "Á",
            "%C1",
            "%C3%81"
          ],
          [
            "Â",
            "%C2",
            "%C3%82"
          ],
          [
            "Ã",
            "%C3",
            "%C3%83"
          ],
          [
            "Ä",
            "%C4",
            "%C3%84"
          ],
          [
            "Å",
            "%C5",
            "%C3%85"
          ]
        ]
      },
      {
        "type": "paragraph",
        "text": "For a complete reference of all URL encodings, visit our\n<a href=\"../tags/ref_urlencode.html\">URL Encoding Reference</a>."
      }
    ]
  },
  "xhtml": {
    "title": "HTML Versus XHTML",
    "blocks": [
      {
        "type": "intro",
        "text": "XHTML is a stricter, more XML-based version of HTML."
      },
      {
        "type": "header",
        "level": 2,
        "text": "What is XHTML?"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "XHTML stands for E<strong>X</strong>tensible <strong>H</strong>yper<strong>T</strong>ext \n<strong>M</strong>arkup <strong>L</strong>anguage",
          "XHTML is a stricter, more XML-based version of HTML",
          "XHTML is HTML defined as an XML application",
          "XHTML is supported by all major browsers"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "Why XHTML?"
      },
      {
        "type": "paragraph",
        "text": "XML is a markup language where all documents must be marked up correctly (be \"well-formed\")."
      },
      {
        "type": "paragraph",
        "text": "XHTML was developed to make HTML more extensible and flexible to work with \nother data formats (such as XML). In addition, browsers ignore errors in HTML \npages, and try to display the website even if it has some errors in the markup. \nSo XHTML comes with a much stricter error handling."
      },
      {
        "type": "paragraph",
        "text": "If you want to study XML, please read our <a href=\"../xml/default.html\">XML Tutorial</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The Most Important Differences from HTML"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "&lt;!DOCTYPE&gt; is <strong>mandatory</strong>",
          "The xmlns attribute in &lt;html&gt; is <strong>mandatory</strong>",
          "&lt;html&gt;, &lt;head&gt;, &lt;title&gt;, and &lt;body&gt; are <strong>mandatory</strong>",
          "Elements must always be <b> properly nested</b>",
          "Elements must always be <b>closed</b>",
          "Elements must always be in <b>lowercase</b>",
          "Attribute names must always be in <b>lowercase</b>",
          "Attribute values must always be <b>quoted</b>",
          "Attribute minimization is <b>forbidden</b>"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML - <!DOCTYPE ....> Is Mandatory"
      },
      {
        "type": "paragraph",
        "text": "An XHTML document must have an XHTML &lt;!DOCTYPE&gt; declaration."
      },
      {
        "type": "paragraph",
        "text": "The &lt;html&gt;, &lt;head&gt;, &lt;title&gt;, and &lt;body&gt; elements must also be present, and the xmlns attribute in &lt;html&gt; \nmust specify the xml namespace for the document."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n  \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n \n<title>Title of document</title>\n</head>\n<body>  some content here... \n  </body>\n</html>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML Elements Must be Properly Nested"
      },
      {
        "type": "paragraph",
        "text": "In XHTML, elements must always be properly nested within each other, like this:"
      },
      {
        "type": "example",
        "title": "Correct:",
        "code": "<b><i>Some \n  text</i></b>"
      },
      {
        "type": "example",
        "title": "Wrong:",
        "code": "<b><i>Some \n  text</b></i>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML Elements Must Always be Closed"
      },
      {
        "type": "paragraph",
        "text": "In XHTML, elements must always be closed, like this:"
      },
      {
        "type": "example",
        "title": "Correct:",
        "code": "<p>This is a paragraph</p>\n<p>This is another paragraph</p>"
      },
      {
        "type": "example",
        "title": "Wrong:",
        "code": "<p>This is a paragraph\n<p>This is another paragraph"
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML Empty Elements Must Always be Closed"
      },
      {
        "type": "paragraph",
        "text": "In XHTML, empty elements must always be closed, like this:"
      },
      {
        "type": "example",
        "title": "Correct:",
        "code": "A break: <br />\nA horizontal rule: <hr />\nAn image: <img src=\"happy.gif\" alt=\"Happy face\" />"
      },
      {
        "type": "example",
        "title": "Wrong:",
        "code": "A break: <br>\nA horizontal rule: <hr>\nAn image: <img src=\"happy.gif\" alt=\"Happy face\">"
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML Elements Must be in Lowercase"
      },
      {
        "type": "paragraph",
        "text": "In XHTML, element names must always be in lowercase, like this:"
      },
      {
        "type": "example",
        "title": "Correct:",
        "code": "<body>\n<p>This is a paragraph</p>\n</body>"
      },
      {
        "type": "example",
        "title": "Wrong:",
        "code": "<BODY>\n<P>This is a paragraph</P>\n</BODY>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML Attribute Names Must be in Lowercase"
      },
      {
        "type": "paragraph",
        "text": "In XHTML, attribute names must always be in lowercase, like this:"
      },
      {
        "type": "example",
        "title": "Correct:",
        "code": "<a href=\"https://www.codingtamilan.com/html/\">Visit our HTML tutorial</a>"
      },
      {
        "type": "example",
        "title": "Wrong:",
        "code": "<a HREF=\"https://www.codingtamilan.com/html/\">Visit our HTML tutorial</a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML Attribute Values Must be Quoted"
      },
      {
        "type": "paragraph",
        "text": "In XHTML, attribute values must always be quoted, like this:"
      },
      {
        "type": "example",
        "title": "Correct:",
        "code": "<a href=\"https://www.codingtamilan.com/html/\">Visit our HTML tutorial</a>"
      },
      {
        "type": "example",
        "title": "Wrong:",
        "code": "<a href=https://www.codingtamilan.com/html/>Visit our HTML tutorial</a>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "XHTML Attribute Minimization is Forbidden"
      },
      {
        "type": "paragraph",
        "text": "In XHTML, attribute minimization is forbidden:"
      },
      {
        "type": "example",
        "title": "Correct:",
        "code": "<input type=\"checkbox\" name=\"vehicle\" value=\"car\" checked=\"checked\" /><input type=\"text\" name=\"lastname\" disabled=\"disabled\" />"
      },
      {
        "type": "example",
        "title": "Wrong:",
        "code": "<input type=\"checkbox\" name=\"vehicle\" value=\"car\" checked /><input type=\"text\" name=\"lastname\" disabled />"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Validate HTML With The W3C Validator"
      }
    ]
  },
  "forms": {
    "title": "HTML Forms",
    "blocks": [
      {
        "type": "intro",
        "text": "An HTML form is used to collect user input. The user input is \nmost often sent to a server for processing."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <form> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;form&gt;</code> element is used to \ncreate an HTML form for user input:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>\n .\nform elements\n .\n </form>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;form&gt;</code> element is a container for different types of input elements, \nsuch as: text fields, checkboxes, radio \nbuttons, submit buttons, etc."
      },
      {
        "type": "paragraph",
        "text": "All\nthe different form elements are covered in this chapter:\n<a href=\"#/html/form-elements\">HTML Form Elements</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <input> Element"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;input&gt;</code> element is the most \nused form element."
      },
      {
        "type": "paragraph",
        "text": "An <code class=\"w3-codespan\">&lt;input&gt;</code> element can be displayed in \nmany ways, depending on the <code class=\"w3-codespan\">type</code> \nattribute."
      },
      {
        "type": "paragraph",
        "text": "Here are some examples:"
      },
      {
        "type": "table",
        "headers": [
          "Type",
          "Description"
        ],
        "rows": [
          [
            "&lt;input type=\"text\"&gt;",
            "Displays a single-line text input field"
          ],
          [
            "&lt;input type=\"radio\"&gt;",
            "Displays a radio button (for selecting one of many choices)"
          ],
          [
            "&lt;input type=\"checkbox\"&gt;",
            "Displays a checkbox (for selecting zero or more of many choices)"
          ],
          [
            "&lt;input type=\"submit\"&gt;",
            "Displays a submit button (for submitting the form)"
          ],
          [
            "&lt;input type=\"button\"&gt;",
            "Displays a clickable button"
          ]
        ]
      },
      {
        "type": "paragraph",
        "text": "All the different input types are covered in this chapter:\n<a href=\"#/html/input-types\">HTML Input Types</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Text Fields"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"text\"&gt;</code> defines a single-line input field for \ntext input."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>\n    <label for=\"fname\">First name:</label><br>  <input \n  type=\"text\" id=\"fname\" name=\"fname\"><br>  <label for=\"lname\">Last \n  name:</label><br>  <input type=\"text\" id=\"lname\" name=\"lname\"></form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "note",
        "text": "<p><b>Note:</b> The form itself is not visible. Also note that the default width \nof an input field is 20 characters.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <label> Element"
      },
      {
        "type": "paragraph",
        "text": "Notice the use of the <code class=\"w3-codespan\">&lt;label&gt;</code> element in the \nexample above."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;label&gt;</code> tag defines a label for many \nform elements."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;label&gt;</code> element is useful for \nscreen-reader users, because the screen-reader will read out loud the label when \nthe user focuses on the input element."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;label&gt;</code> element also helps users who have \ndifficulty clicking on very small regions (such as radio buttons or checkboxes) \n- because when the user clicks the text within the <code class=\"w3-codespan\">&lt;label&gt;</code> element, it toggles \nthe radio button/checkbox."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">for</code> attribute of the <code class=\"w3-codespan\">&lt;label&gt;</code> tag should \nbe equal to the <code class=\"w3-codespan\">id</code> attribute of the <code class=\"w3-codespan\">&lt;input&gt;</code>  \nelement to bind them together."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Radio Buttons"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"radio\"&gt;</code> defines a radio button."
      },
      {
        "type": "paragraph",
        "text": "Radio buttons let a user select ONE of a limited number of choices."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>Choose your favorite Web language:</p>\n<form>  <input type=\"radio\" id=\"html\" name=\"fav_language\" \n  value=\"HTML\">  <label for=\"html\">HTML</label><br>  <input \n  type=\"radio\" id=\"css\" name=\"fav_language\" value=\"CSS\">  <label \n  for=\"css\">CSS</label><br>  <input type=\"radio\" id=\"javascript\" \n  name=\"fav_language\" value=\"JavaScript\">  <label for=\"javascript\">JavaScript</label></form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "paragraph",
        "text": "Choose your favorite Web language:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Checkboxes"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"checkbox\"&gt;</code> defines a <strong>checkbox</strong>."
      },
      {
        "type": "paragraph",
        "text": "Checkboxes let a user select ZERO or MORE options of a limited number of choices."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <input type=\"checkbox\" id=\"vehicle1\" name=\"vehicle1\" value=\"Bike\">  \n  <label for=\"vehicle1\"> I have a bike</label><br>  <input \n  type=\"checkbox\" id=\"vehicle2\" name=\"vehicle2\" value=\"Car\">  <label for=\"vehicle2\"> \n  I have a car</label><br>  <input type=\"checkbox\" \n  id=\"vehicle3\" name=\"vehicle3\" \n  value=\"Boat\">  <label for=\"vehicle3\"> I have a boat</label>\n </form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The Submit Button"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"submit\"&gt;</code> defines a button for submitting the form data to a form-handler."
      },
      {
        "type": "paragraph",
        "text": "The form-handler is typically a file on the server with a script for processing \ninput data."
      },
      {
        "type": "paragraph",
        "text": "The form-handler is specified in the form's <code class=\"w3-codespan\">action</code> \nattribute."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\">  <label for=\"fname\">First \n  name:</label><br>  <input type=\"text\" id=\"fname\" name=\"fname\" \n  value=\"John\"><br>  <label for=\"lname\">Last name:</label><br>  \n  <input type=\"text\" id=\"lname\" name=\"lname\" value=\"Doe\"><br><br>  \n  <input type=\"submit\" value=\"Submit\"></form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The Name Attribute for <input>"
      },
      {
        "type": "paragraph",
        "text": "Notice that each input field must have a <code class=\"w3-codespan\">name</code> attribute to be submitted."
      },
      {
        "type": "paragraph",
        "text": "If the <code class=\"w3-codespan\">name</code> attribute is omitted, the value of the input field will not be sent at all."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\">  <label for=\"fname\">First \n  name:</label><br>  <input type=\"text\" id=\"fname\" value=\"John\"><br><br>  \n  <input type=\"submit\" value=\"Submit\"></form>"
      }
    ]
  },
  "form-elements": {
    "title": "HTML Form Elements",
    "blocks": [
      {
        "type": "intro",
        "text": "This chapter describes all the different HTML form elements."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <form> Elements"
      },
      {
        "type": "paragraph",
        "text": "The HTML <code class=\"w3-codespan\">&lt;form&gt;</code> element can contain one or more of the following form elements:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "<code class=\"w3-codespan\">&lt;input&gt;</code>",
          "<code class=\"w3-codespan\">&lt;label&gt;</code>",
          "<code class=\"w3-codespan\">&lt;select&gt;</code>",
          "<code class=\"w3-codespan\">&lt;textarea&gt;</code>",
          "<code class=\"w3-codespan\">&lt;button&gt;</code>",
          "<code class=\"w3-codespan\">&lt;fieldset&gt;</code>",
          "<code class=\"w3-codespan\">&lt;legend&gt;</code>",
          "<code class=\"w3-codespan\">&lt;datalist&gt;</code>",
          "<code class=\"w3-codespan\">&lt;output&gt;</code>",
          "<code class=\"w3-codespan\">&lt;option&gt;</code>",
          "<code class=\"w3-codespan\">&lt;optgroup&gt;</code>"
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <input> Element"
      },
      {
        "type": "paragraph",
        "text": "One of the most used form elements is the <code class=\"w3-codespan\">&lt;input&gt;</code> element."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input&gt;</code> element can be displayed in several ways, depending on the <code class=\"w3-codespan\">type</code> \nattribute."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<label for=\"fname\">First name:</label><input type=\"text\" id=\"fname\" name=\"fname\">"
      },
      {
        "type": "paragraph",
        "text": "All the different values of the <code class=\"w3-codespan\">type</code> \nattribute are covered in the next chapter:\n<a href=\"#/html/input-types\">HTML Input Types</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <label> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;label&gt;</code> element defines a label for \nseveral \nform elements."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;label&gt;</code> element is useful for \nscreen-reader users, because the screen-reader will read out loud the label when \nthe user focus on the input element."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;label&gt;</code> element also help users who have \ndifficulty clicking on very small regions (such as radio buttons or checkboxes) \n- because when the user clicks the text within the <code class=\"w3-codespan\">&lt;label&gt;</code> element, it toggles \nthe radio button/checkbox."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">for</code> attribute of the <code class=\"w3-codespan\">&lt;label&gt;</code> tag should \nbe equal to the <code class=\"w3-codespan\">id</code> attribute of the <code class=\"w3-codespan\">&lt;input&gt;</code>  \nelement to bind them together."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <select> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;select&gt;</code> element defines a drop-down list:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<label for=\"cars\">Choose a car:</label><select id=\"cars\" name=\"cars\">  <option value=\"volvo\">Volvo</option>\n  \n <option value=\"saab\">Saab</option>  <option value=\"fiat\">Fiat</option>\n  \n <option value=\"audi\">Audi</option></select>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;option&gt;</code> element defines an option that can be \nselected."
      },
      {
        "type": "paragraph",
        "text": "By default, the first item in the drop-down list is selected."
      },
      {
        "type": "paragraph",
        "text": "To define a pre-selected option, add the <code class=\"w3-codespan\">selected</code> attribute \nto the option:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<option value=\"fiat\" selected>Fiat</option>"
      },
      {
        "type": "header",
        "level": 3,
        "text": "Visible Values:"
      },
      {
        "type": "paragraph",
        "text": "Use the <code class=\"w3-codespan\">size</code> attribute to specify the number of visible values:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<label for=\"cars\">Choose a car:</label><select id=\"cars\" name=\"cars\" size=\"3\">  <option value=\"volvo\">Volvo</option>\n  \n <option value=\"saab\">Saab</option>  <option value=\"fiat\">Fiat</option>\n  \n <option value=\"audi\">Audi</option></select>"
      },
      {
        "type": "header",
        "level": 3,
        "text": "Allow Multiple Selections:"
      },
      {
        "type": "paragraph",
        "text": "Use the <code class=\"w3-codespan\">multiple</code> attribute to allow the user to select more than one value:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<label for=\"cars\">Choose a car:</label><select id=\"cars\" name=\"cars\" size=\"4\" multiple>  <option value=\"volvo\">Volvo</option>\n  \n <option value=\"saab\">Saab</option>  <option value=\"fiat\">Fiat</option>\n  \n <option value=\"audi\">Audi</option></select>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <textarea> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;textarea&gt;</code> element defines a multi-line input field (a text area):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<textarea name=\"message\" rows=\"10\" cols=\"30\">The cat was playing in the garden.</textarea>"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">rows</code> attribute specifies the visible number of lines in \na text area."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">cols</code> attribute specifies the visible width of a text \narea."
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "paragraph",
        "text": "You can also define the size of the text area by using CSS:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<textarea name=\"message\" \n  style=\"width:200px; height:600px;\">The cat was playing in the garden.</textarea>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <button> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;button&gt;</code> element defines a clickable \nbutton:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<button type=\"button\" \n onclick=\"alert('Hello World!')\">Click Me!</button>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Always specify the <code class=\"w3-codespan\">type</code> attribute for the button element. Different browsers may use different default types for the button element.\n</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <fieldset> and <legend> Elements"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;fieldset&gt;</code> element is used to group related data in a form."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;legend&gt;</code> element defines a caption for the <code class=\"w3-codespan\">\n&lt;fieldset&gt;</code>\nelement."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\">  <fieldset>    \n  <legend>Personalia:</legend>    <label for=\"fname\">First \n  name:</label><br>    <input type=\"text\" id=\"fname\" name=\"fname\" \n  value=\"John\"><br>    <label for=\"lname\">Last name:</label><br>    \n  <input type=\"text\" id=\"lname\" name=\"lname\" value=\"Doe\"><br><br>    \n  <input type=\"submit\" value=\"Submit\">  </fieldset></form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <datalist> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;datalist&gt;</code> element specifies a list of pre-defined options for an <code class=\"w3-codespan\">&lt;input&gt;</code> element."
      },
      {
        "type": "paragraph",
        "text": "Users will see a drop-down list of the pre-defined options as they input data."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">list</code> attribute of the <code class=\"w3-codespan\">&lt;input&gt;</code> element, must refer to the\n<code class=\"w3-codespan\">id</code> attribute of the <code class=\"w3-codespan\">&lt;datalist&gt;</code> element."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\">  <input list=\"browsers\">\n  \n <datalist id=\"browsers\">\n     <option value=\"Edge\">\n \n  <option value=\"Firefox\">\n    <option value=\"Chrome\">\n \n  <option value=\"Opera\">\n    <option value=\"Safari\">\n  \n </datalist> </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The <output> Element"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;output&gt;</code> element represents the result of a calculation (like one \nperformed by a script)."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\"  oninput=\"x.value=parseInt(a.value)+parseInt(b.value)\">  0\n     \n    <input type=\"range\"  id=\"a\" name=\"a\" value=\"50\">  100 +\n     \n    <input type=\"number\" id=\"b\" name=\"b\" value=\"50\">  =\n     \n    <output name=\"x\" for=\"a b\"></output>  <br><br>  <input type=\"submit\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Form Elements"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_form.html\">&lt;form&gt;</a>",
            "Defines an HTML form for user input"
          ],
          [
            "<a href=\"../tags/tag_input.html\">&lt;input&gt;</a>",
            "Defines an input control"
          ],
          [
            "<a href=\"../tags/tag_textarea.html\">&lt;textarea&gt;</a>",
            "Defines a multiline input control (text area)"
          ],
          [
            "<a href=\"../tags/tag_label.html\">&lt;label&gt;</a>",
            "Defines a label for an &lt;input&gt; element"
          ],
          [
            "<a href=\"../tags/tag_fieldset.html\">&lt;fieldset&gt;</a>",
            "Groups related elements in a form"
          ],
          [
            "<a href=\"../tags/tag_legend.html\">&lt;legend&gt;</a>",
            "Defines a caption for a &lt;fieldset&gt; element"
          ],
          [
            "<a href=\"../tags/tag_select.html\">&lt;select&gt;</a>",
            "Defines a drop-down list"
          ],
          [
            "<a href=\"../tags/tag_optgroup.html\">&lt;optgroup&gt;</a>",
            "Defines a group of related options in a drop-down list"
          ],
          [
            "<a href=\"../tags/tag_option.html\">&lt;option&gt;</a>",
            "Defines an option in a drop-down list"
          ],
          [
            "<a href=\"../tags/tag_button.html\">&lt;button&gt;</a>",
            "Defines a clickable button"
          ],
          [
            "<a href=\"../tags/tag_datalist.html\">&lt;datalist&gt;</a>",
            "Specifies a list of pre-defined options for input controls"
          ],
          [
            "<a href=\"../tags/tag_output.html\">&lt;output&gt;</a>",
            "Defines the result of a calculation"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "input-types": {
    "title": "HTML Input Types",
    "blocks": [
      {
        "type": "intro",
        "text": "This chapter describes the different types for the HTML <code class=\"w3-codespan\">&lt;input&gt;</code> element."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Input Types"
      },
      {
        "type": "paragraph",
        "text": "Here are the different input types you can use in HTML:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "<code class=\"w3-codespan\">&lt;input type=\"button\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"checkbox\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"color\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"date\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"datetime-local\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"email\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"file\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"hidden\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"image\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"month\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"number\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"password\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"radio\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"range\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"reset\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"search\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"submit\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"tel\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"text\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"time\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"url\"&gt;</code>",
          "<code class=\"w3-codespan\">&lt;input type=\"week\"&gt;</code>"
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> The default value of the <code class=\"w3-codespan\">type</code> attribute \nis \n\"text\".</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Text"
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;input type=\"text\"&gt;</code> defines a <strong>\nsingle-line text input field</strong>:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>\n    <label for=\"fname\">First name:</label><br>  <input \n  type=\"text\" id=\"fname\" name=\"fname\"><br>  <label for=\"lname\">Last \n  name:</label><br>  <input type=\"text\" id=\"lname\" name=\"lname\">\n</form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Password"
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;input type=\"password\"&gt;</code> defines a <strong>password field</strong>:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>\n   <label for=\"username\">Username:</label><br>  <input type=\"text\" \n  id=\"username\" name=\"username\"><br>  <label for=\"pwd\">Password:</label><br>  \n  <input type=\"password\" id=\"pwd\" name=\"pwd\">\n</form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "note",
        "text": "<p>The characters in a password field are masked (shown as asterisks or circles).\n</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Submit"
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;input type=\"submit\"&gt;</code> defines a button for <strong>\nsubmitting</strong> form data to a <strong>form-handler</strong>."
      },
      {
        "type": "paragraph",
        "text": "The form-handler is typically a server page with a script for processing \ninput data."
      },
      {
        "type": "paragraph",
        "text": "The form-handler is specified in the form's <code class=\"w3-codespan\">action</code> \nattribute:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\">  <label for=\"fname\">First \n  name:</label><br>  <input type=\"text\" id=\"fname\" name=\"fname\" \n  value=\"John\"><br>  <label for=\"lname\">Last name:</label><br>  \n  <input type=\"text\" id=\"lname\" name=\"lname\" value=\"Doe\"><br><br>  \n  <input type=\"submit\" value=\"Submit\"></form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "paragraph",
        "text": "If you omit the submit button's value attribute, the button will get a default text:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\">  <label for=\"fname\">First \n  name:</label><br>  <input type=\"text\" id=\"fname\" name=\"fname\" \n  value=\"John\"><br>  <label for=\"lname\">Last name:</label><br>  \n  <input type=\"text\" id=\"lname\" name=\"lname\" value=\"Doe\"><br><br>  \n  <input type=\"submit\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Reset"
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;input type=\"reset\"&gt;</code> defines a <strong>reset button</strong> \nthat will reset all form values to their default values:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\">  <label for=\"fname\">First \n  name:</label><br>  <input type=\"text\" id=\"fname\" name=\"fname\" \n  value=\"John\"><br>  <label for=\"lname\">Last name:</label><br>  \n  <input type=\"text\" id=\"lname\" name=\"lname\" value=\"Doe\"><br><br>  \n  <input type=\"submit\" value=\"Submit\">  <input type=\"reset\" \n  value=\"Reset\"></form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "note",
        "text": "<p>If you change the input values and then click the \"Reset\" button, the form-data will be reset to the default values.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Radio"
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;input type=\"radio\"&gt;</code> defines a <strong>radio button</strong>."
      },
      {
        "type": "paragraph",
        "text": "Radio buttons let a user select ONLY ONE of a limited number of choices:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<p>Choose your favorite Web language:</p>\n<form>  <input type=\"radio\" id=\"html\" name=\"fav_language\" \n  value=\"HTML\">  <label for=\"html\">HTML</label><br>  <input \n  type=\"radio\" id=\"css\" name=\"fav_language\" value=\"CSS\">  <label \n  for=\"css\">CSS</label><br>  <input type=\"radio\" id=\"javascript\" \n  name=\"fav_language\" value=\"JavaScript\">  <label for=\"javascript\">JavaScript</label></form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Checkbox"
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;input type=\"checkbox\"&gt;</code> defines a <strong>checkbox</strong>."
      },
      {
        "type": "paragraph",
        "text": "Checkboxes let a user select ZERO or MORE options of a limited number of choices."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <input type=\"checkbox\" id=\"vehicle1\" name=\"vehicle1\" value=\"Bike\">  \n  <label for=\"vehicle1\"> I have a bike</label><br>  <input \n  type=\"checkbox\" id=\"vehicle2\" name=\"vehicle2\" value=\"Car\">  <label for=\"vehicle2\"> \n  I have a car</label><br>  <input type=\"checkbox\" \n  id=\"vehicle3\" name=\"vehicle3\" \n  value=\"Boat\">  <label for=\"vehicle3\"> I have a boat</label>\n </form>"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Button"
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">&lt;input type=\"button\"&gt;</code> defines a <strong>button</strong>:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<input type=\"button\" onclick=\"alert('Hello World!')\" value=\"Click Me!\">"
      },
      {
        "type": "paragraph",
        "text": "This is how the HTML code above will be displayed in a browser:"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Color"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"color\"&gt;</code> is used for input fields that should contain a color."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, a color picker can show up in the input field."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"favcolor\">Select your favorite \n  color:</label>  <input type=\"color\" id=\"favcolor\" name=\"favcolor\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Date"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"date\"&gt;</code> is used for input fields that should contain a date."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, a date picker can show up in the input field."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"birthday\">Birthday:</label>  <input \n  type=\"date\" id=\"birthday\" name=\"birthday\"></form>"
      },
      {
        "type": "paragraph",
        "text": "You can also use the <code class=\"w3-codespan\">min</code> and <code class=\"w3-codespan\">max</code> attributes to add restrictions to dates:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"datemax\">Enter a date before \n  1980-01-01:</label>  <input type=\"date\" id=\"datemax\" name=\"datemax\" \n  max=\"1979-12-31\"><br><br>  <label for=\"datemin\">Enter a date after \n  2000-01-01:</label>  <input type=\"date\" id=\"datemin\" name=\"datemin\" \n  min=\"2000-01-02\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Datetime-local"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"datetime-local\"&gt;</code> specifies \na date and time input field, with no time zone."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, a date picker can show up in the input field."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"birthdaytime\">Birthday (date and \n  time):</label>  <input type=\"datetime-local\" id=\"birthdaytime\" name=\"birthdaytime\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Email"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"email\"&gt;</code> is used for input fields that should contain an e-mail address."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, the e-mail address can be automatically validated when submitted."
      },
      {
        "type": "paragraph",
        "text": "Some smartphones recognize the email type, and add \".com\" to the keyboard to match email input."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"email\">Enter your email:</label>  \n  <input type=\"email\" id=\"email\" name=\"email\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Image"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"image\"&gt;</code> \ndefines an image as a submit button."
      },
      {
        "type": "paragraph",
        "text": "The path to the image is specified in the <code class=\"w3-codespan\">src</code> attribute."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form><input type=\"image\" src=\"img_submit.gif\" alt=\"Submit\" \n  width=\"48\" height=\"48\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type File"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"file\"&gt;</code> \ndefines a file-select field and a \"Browse\" button for file uploads."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"myfile\">Select a file:</label>  \n  <input type=\"file\" id=\"myfile\" name=\"myfile\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Hidden"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"hidden\"&gt;</code> \ndefines a hidden input field (not visible to a user)."
      },
      {
        "type": "paragraph",
        "text": "A hidden field lets web developers include data that cannot be seen or \nmodified by users when a form is submitted."
      },
      {
        "type": "paragraph",
        "text": "A hidden field often stores what database record that needs to be updated \nwhen the form is submitted."
      },
      {
        "type": "paragraph",
        "text": "<strong>Note:</strong> While the value is not displayed to the user in the \npage's content, it is visible (and can be edited) using any browser's developer \ntools or \"View Source\" functionality. Do not use hidden inputs as a form of \nsecurity!"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"fname\">First name:</label>  \n  <input type=\"text\" id=\"fname\" name=\"fname\"><br><br>  <input \n  type=\"hidden\" id=\"custId\" name=\"custId\" value=\"3487\">  <input \n  type=\"submit\" value=\"Submit\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Month"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"month\"&gt;</code> allows the user to select a month and year."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, a date picker can show up in the input field."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"bdaymonth\">Birthday (month and \n  year):</label>  <input type=\"month\" id=\"bdaymonth\" name=\"bdaymonth\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Number"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"number\"&gt;</code> defines a <strong>\nnumeric</strong> input field."
      },
      {
        "type": "paragraph",
        "text": "You can also set restrictions on what numbers are accepted."
      },
      {
        "type": "paragraph",
        "text": "The following example displays a numeric input field, where you can enter a value from 1 to 5:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"quantity\">Quantity (between 1 and \n  5):</label>  <input type=\"number\" id=\"quantity\" name=\"quantity\" \n  min=\"1\" max=\"5\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Restrictions"
      },
      {
        "type": "paragraph",
        "text": "Here is a list of some common input restrictions:"
      },
      {
        "type": "table",
        "headers": [
          "Attribute",
          "Description"
        ],
        "rows": [
          [
            "checked",
            "Specifies that an input field should be pre-selected when the page loads (for type=\"checkbox\" or type=\"radio\")"
          ],
          [
            "disabled",
            "Specifies that an input field should be disabled"
          ],
          [
            "max",
            "Specifies the maximum value for an input field"
          ],
          [
            "maxlength",
            "Specifies the maximum number of character for an input field"
          ],
          [
            "min",
            "Specifies the minimum value for an input field"
          ],
          [
            "pattern",
            "Specifies a regular expression to check the input value against"
          ],
          [
            "readonly",
            "Specifies that an input field is read only (cannot be changed)"
          ],
          [
            "required",
            "Specifies that an input field is required (must be filled out)"
          ],
          [
            "size",
            "Specifies the width (in characters) of an input field"
          ],
          [
            "step",
            "Specifies the legal number intervals for an input field"
          ],
          [
            "value",
            "Specifies the default value for an input field"
          ]
        ]
      },
      {
        "type": "paragraph",
        "text": "You will learn more about input restrictions in the next chapter."
      },
      {
        "type": "paragraph",
        "text": "The following example displays a numeric input field, where you can enter a \nvalue from 0 to 100, in steps of 10. The default value is 30:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"quantity\">Quantity:</label>  <input \n  type=\"number\" id=\"quantity\" name=\"quantity\" min=\"0\" max=\"100\" step=\"10\" \n  value=\"30\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Range"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"range\"&gt;</code> defines a control for entering a number whose exact value is not important (like a slider control). Default \nrange is 0 to 100. However, you can set restrictions on what \nnumbers are accepted with the <code class=\"w3-codespan\">min</code>, <code class=\"w3-codespan\">max</code>, and <code class=\"w3-codespan\">step</code> attributes:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"vol\">Volume (between 0 and 50):</label>  \n    <input type=\"range\" id=\"vol\" name=\"vol\" min=\"0\" max=\"50\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Search"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"search\"&gt;</code> is used for search fields (a search field behaves like a regular text field)."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"gsearch\">Search Google:</label>  \n  <input type=\"search\" id=\"gsearch\" name=\"gsearch\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Tel"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"tel\"&gt;</code> is used for input fields that should contain a telephone number."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"phone\">Enter your phone number:</label>  \n    <input type=\"tel\" id=\"phone\" name=\"phone\" \n    pattern=\"[0-9]{3}-[0-9]{2}-[0-9]{3}\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Time"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"time\"&gt;</code> allows the user to select a time (no time zone)."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, a time picker can show up in the input field."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"appt\">Select a time:</label>  \n  <input type=\"time\" id=\"appt\" name=\"appt\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Url"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"url\"&gt;</code> is used for input fields that should contain a URL address."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, the url field can be automatically validated \nwhen submitted."
      },
      {
        "type": "paragraph",
        "text": "Some smartphones recognize the url type, and adds \".com\" to the keyboard to match \nurl input."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"homepage\">Add your homepage:</label>  \n  <input type=\"url\" id=\"homepage\" name=\"homepage\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Input Type Week"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;input type=\"week\"&gt;</code> allows the user to select a week and year."
      },
      {
        "type": "paragraph",
        "text": "Depending on browser support, a date picker can show up in the input field."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"week\">Select a week:</label>  \n  <input type=\"week\" id=\"week\" name=\"week\">\n </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Input Type Attribute"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/att_input_type.html\">&lt;input type=\"\"&gt;</a>",
            "Specifies the input type to display"
          ]
        ]
      }
    ]
  },
  "input-attributes": {
    "title": "HTML Input Attributes",
    "blocks": [
      {
        "type": "intro",
        "text": "This chapter describes the different attributes for the HTML <code class=\"w3-codespan\">&lt;input&gt;</code> element."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The value Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">value</code> attribute specifies an initial value for an input field:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>\n  <label for=\"fname\">First name:</label><br>  <input type=\"text\" \n  id=\"fname\" name=\"fname\" value=\"John\"><br>  <label for=\"lname\">Last \n  name:</label><br>  <input type=\"text\" id=\"lname\" name=\"lname\" \n  value=\"Doe\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The readonly Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">readonly</code> attribute specifies that an input field is read-only."
      },
      {
        "type": "paragraph",
        "text": "A read-only input field cannot be modified (however, a user can tab to it, highlight it, and copy the text from it)."
      },
      {
        "type": "paragraph",
        "text": "The value of a read-only input field will be sent when submitting the form!"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>\n  <label for=\"fname\">First name:</label><br>  <input type=\"text\" \n  id=\"fname\" name=\"fname\" value=\"John\" readonly><br>  <label for=\"lname\">Last \n  name:</label><br>  <input type=\"text\" id=\"lname\" name=\"lname\" \n  value=\"Doe\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The disabled Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">disabled</code> attribute specifies that an input field should be disabled."
      },
      {
        "type": "paragraph",
        "text": "A disabled input field is unusable and un-clickable."
      },
      {
        "type": "paragraph",
        "text": "The value of a disabled input field will not be sent when submitting the form!"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>\n  <label for=\"fname\">First name:</label><br>  <input type=\"text\" \n  id=\"fname\" name=\"fname\" value=\"John\" disabled><br>  <label for=\"lname\">Last \n  name:</label><br>  <input type=\"text\" id=\"lname\" name=\"lname\" \n  value=\"Doe\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The size Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">size</code> attribute specifies the \nvisible width, in characters, of an input field."
      },
      {
        "type": "paragraph",
        "text": "The default value for <code class=\"w3-codespan\">size</code> is 20."
      },
      {
        "type": "paragraph",
        "text": "<strong>Note:</strong> The <code class=\"w3-codespan\">size</code> attribute \nworks with the following input types: text, search, tel, url, email, and \npassword."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"fname\">First name:</label><br>  <input \n  type=\"text\" id=\"fname\" name=\"fname\" size=\"50\"><br>  <label \n  for=\"pin\">PIN:</label><br>  <input type=\"text\" id=\"pin\" name=\"pin\" \n  size=\"4\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The maxlength Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">maxlength</code> attribute specifies the maximum number of characters allowed in an input field."
      },
      {
        "type": "paragraph",
        "text": "<strong>Note:</strong> When a <code class=\"w3-codespan\">maxlength</code> is set, the input field will not accept more than the \nspecified number of characters. However, this attribute does not provide any feedback. \nSo, if you want to alert the user, \nyou must write JavaScript code."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"fname\">First name:</label><br>  <input \n  type=\"text\" id=\"fname\" name=\"fname\" size=\"50\"><br>  <label \n  for=\"pin\">PIN:</label><br>  <input type=\"text\" id=\"pin\" name=\"pin\" \n  maxlength=\"4\" size=\"4\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The min and max Attributes"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">min</code> and <code class=\"w3-codespan\">max</code> attributes specify the minimum and maximum values for an \ninput field."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">min</code> and <code class=\"w3-codespan\">max</code> attributes work with the following input types: number, range, date, datetime-local, month, time and week."
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> Use the max and min attributes together to create a \nrange of legal values."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"datemax\">Enter a date before \n  1980-01-01:</label>  <input type=\"date\" id=\"datemax\" name=\"datemax\" \n  max=\"1979-12-31\"><br><br>  <label for=\"datemin\">Enter a date \n  after 2000-01-01:</label>  <input type=\"date\" id=\"datemin\" name=\"datemin\" \n  min=\"2000-01-02\"><br><br>  <label for=\"quantity\">Quantity \n  (between 1 and 5):</label>  <input type=\"number\" id=\"quantity\" \n  name=\"quantity\" min=\"1\" max=\"5\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The multiple Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">multiple</code> attribute specifies that the user is allowed to enter more than one value in \nan input field."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">multiple</code> attribute works with the following input types: email, and file."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"files\">Select files:</label>  <input \n  type=\"file\" id=\"files\" name=\"files\" multiple></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The pattern Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">pattern</code> attribute specifies a regular expression that the \ninput field's value is checked against, when the form is submitted."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">pattern</code> attribute works with the following input types: text, \ndate, search, url, tel, email, and password."
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> Use the global <a href=\"../tags/att_global_title.html\">title</a> attribute to describe the pattern to help the user."
      },
      {
        "type": "paragraph",
        "text": "<b>Tip:</b> Learn more about <a href=\"../js/js_regexp.html\">regular expressions</a> in our JavaScript tutorial."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"country_code\">Country code:</label>  \n  <input type=\"text\" id=\"country_code\" name=\"country_code\"  \n  pattern=\"[A-Za-z]{3}\" title=\"Three letter country code\"></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The placeholder Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">placeholder</code> attribute specifies \na short hint that describes the expected value of an input field (a sample value or a short description of the \nexpected format)."
      },
      {
        "type": "paragraph",
        "text": "The short hint is displayed in the input field before the user enters a \nvalue."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">placeholder</code> attribute works with the following input types: text, search, url, \nnumber, tel, email, and password."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"phone\">Enter a phone number:</label>  \n  <input type=\"tel\" id=\"phone\" name=\"phone\"  \n  placeholder=\"123-45-678\"  pattern=\"[0-9]{3}-[0-9]{2}-[0-9]{3}\">\n  </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The required Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">required</code> attribute specifies that an input field must be filled out before submitting the form."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">required</code> attribute works with the following input types: text, search, url, tel, email, password, date pickers, number, checkbox, radio, and file."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"username\">Username:</label>  <input \n  type=\"text\" id=\"username\" name=\"username\" required></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The step Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">step</code> attribute specifies the legal number intervals for an \ninput field."
      },
      {
        "type": "paragraph",
        "text": "Example: if step=\"3\", legal numbers could be -3, 0, 3, 6, etc."
      },
      {
        "type": "paragraph",
        "text": "<b>Tip:</b> This attribute can be used together with the max and min attributes to create a range of legal values."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">step</code> attribute works with the following input types: number, range, date, datetime-local, month, time and week."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"points\">Points:</label>  <input \n  type=\"number\" id=\"points\" name=\"points\" step=\"3\"></form>"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Input restrictions are not foolproof, and JavaScript provides many ways to \nadd illegal input. To safely restrict input, it must also be checked by the receiver \n(the server)!\n</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The autofocus Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">autofocus</code> attribute specifies that \nan input field should automatically get focus when the page loads."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"fname\">First name:</label><br>  <input \n  type=\"text\" id=\"fname\" name=\"fname\" autofocus><br>  <label for=\"lname\">Last \n  name:</label><br>  <input type=\"text\" id=\"lname\" name=\"lname\">\n  </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The height and width Attributes"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">height</code> and <code class=\"w3-codespan\">width</code> attributes specify the height and width of an <code class=\"w3-codespan\">&lt;input \ntype=\"image\"&gt;</code> element."
      },
      {
        "type": "note",
        "text": "<p><strong>Tip:</strong> Always specify both the height and width attributes for \nimages. If height and width are set, the space required for the image is \nreserved when the page is loaded. Without these attributes, the browser does not \nknow the size of the image, and cannot reserve the appropriate space to it. The \neffect will be that the page layout will change during loading (while the images \nload).</p>"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form>  <label for=\"fname\">First name:</label>  <input \n  type=\"text\" id=\"fname\" name=\"fname\"><br><br>  <label for=\"lname\">Last \n  name:</label>  <input type=\"text\" id=\"lname\" name=\"lname\"><br><br>  \n  <input type=\"image\" src=\"img_submit.gif\" alt=\"Submit\" width=\"48\" height=\"48\">\n  </form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The list Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">list</code> attribute refers to a <code class=\"w3-codespan\">&lt;datalist&gt;</code> element that contains pre-defined options for an &lt;input&gt; element."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form> \n<input list=\"browsers\"> \n <datalist id=\"browsers\">\n     <option value=\"Edge\">\n \n  <option value=\"Firefox\">\n \n  <option value=\"Chrome\">\n \n  <option value=\"Opera\">\n \n  <option value=\"Safari\">\n  \n </datalist></form>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The autocomplete Attribute"
      },
      {
        "type": "paragraph",
        "text": "The input <code class=\"w3-codespan\">autocomplete</code> attribute specifies whether a form or \nan input field should have autocomplete on or off."
      },
      {
        "type": "paragraph",
        "text": "Autocomplete allows the browser to predict the value. When a user starts to \ntype in a field, the browser should display options to fill in the field, based \non earlier typed values."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">autocomplete</code> attribute works with <code class=\"w3-codespan\">&lt;form&gt;</code> and the \nfollowing <code class=\"w3-codespan\">&lt;input&gt;</code> types: text, search, url, tel, email, password, datepickers, range, and color."
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<form action=\"/action_page.php\" autocomplete=\"on\">  <label for=\"fname\">First \n    name:</label>  <input type=\"text\" id=\"fname\" name=\"fname\"><br><br>  \n    <label for=\"lname\">Last name:</label>  <input type=\"text\" id=\"lname\" \n    name=\"lname\"><br><br>  <label for=\"email\">Email:</label>  \n    <input type=\"email\" id=\"email\" name=\"email\" autocomplete=\"off\"><br><br>  \n    <input type=\"submit\" value=\"Submit\"></form>"
      },
      {
        "type": "paragraph",
        "text": "<strong>Tip:</strong> In some browsers you may need to activate an \nautocomplete function for this to work (Look under \"Preferences\" in the \nbrowser's menu)."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Form and Input Elements"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_form.html\">&lt;form&gt;</a>",
            "Defines an HTML form for user input"
          ],
          [
            "<a href=\"../tags/tag_input.html\">&lt;input&gt;</a>",
            "Defines an input control"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p>For a complete list of all available HTML tags, visit our <a href=\"../tags/default.html\">HTML Tag Reference</a>.</p>"
      }
    ]
  },
  "media": {
    "title": "HTML  Multimedia",
    "blocks": [
      {
        "type": "intro",
        "text": "Multimedia on the web is sound, music, videos, movies, and animations."
      },
      {
        "type": "header",
        "level": 2,
        "text": "What is Multimedia?"
      },
      {
        "type": "paragraph",
        "text": "Multimedia comes in many different formats. It can be almost anything you can \nhear or see, like images, music, \nsound, videos, records, films, animations, and more."
      },
      {
        "type": "paragraph",
        "text": "Web pages often contain multimedia elements of different types and formats."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Browser Support"
      },
      {
        "type": "paragraph",
        "text": "The first web browsers had support for text only, limited to a single font in a single color."
      },
      {
        "type": "paragraph",
        "text": "Later came browsers with support for colors, fonts, images, and multimedia!"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Multimedia Formats"
      },
      {
        "type": "paragraph",
        "text": "Multimedia elements (like audio or video) are stored in media files."
      },
      {
        "type": "paragraph",
        "text": "The most common way to discover the type of a file, is to look at the file \nextension."
      },
      {
        "type": "paragraph",
        "text": "Multimedia files have formats and different extensions \nlike: .wav, .mp3, .mp4, .mpg, .wmv, and .avi."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Common Video Formats"
      },
      {
        "type": "image",
        "src": "assets/images/html/pic_video.jpg",
        "alt": "Videoformats"
      },
      {
        "type": "table",
        "headers": [
          "Format",
          "File",
          "Description"
        ],
        "rows": [
          [
            "MPEG",
            ".mpg<br>.mpeg",
            "MPEG. \nDeveloped by \nthe Moving Pictures Expert Group. The first popular video format on \nthe web. Not supported anymore in HTML."
          ],
          [
            "AVI",
            ".avi",
            "AVI (Audio Video Interleave). Developed by Microsoft. Commonly used in video cameras and TV \nhardware. Plays well on Windows computers, but not in web browsers."
          ],
          [
            "WMV",
            ".wmv",
            "WMV (Windows Media Video). Developed by Microsoft. Commonly used in \nvideo cameras and TV hardware. Plays well on Windows computers, but not in  \nweb browsers."
          ],
          [
            "QuickTime",
            ".mov",
            "QuickTime. Developed by Apple. Commonly used in video cameras and TV hardware. \nPlays well on Apple computers, but not in web browsers."
          ],
          [
            "RealVideo",
            ".rm<br>.ram",
            "RealVideo. Developed by Real Media to allow video streaming with low \nbandwidths. Does not play \nin web browsers."
          ],
          [
            "Flash",
            ".swf<br>.flv",
            "Flash. Developed by Macromedia. Often requires an extra component (plug-in) to play in \nweb browsers."
          ],
          [
            "Ogg",
            ".ogg",
            "Theora Ogg. Developed by the Xiph.Org Foundation. Supported by HTML."
          ],
          [
            "WebM",
            ".webm",
            "WebM. \nDeveloped by Mozilla, Opera, Adobe, and Google. Supported by \nHTML."
          ],
          [
            "MPEG-4<br>or MP4",
            ".mp4",
            "MP4. \nDeveloped by \nthe Moving Pictures Expert Group. Commonly used in video cameras and TV hardware. \nSupported by all browsers and&nbsp; recommended by YouTube.&nbsp;"
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Only MP4, WebM, and Ogg video are supported by the HTML standard.</p>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Common Audio Formats"
      },
      {
        "type": "paragraph",
        "text": "MP3 is the best format for compressed recorded music. The \nterm MP3 has become synonymous with digital music."
      },
      {
        "type": "paragraph",
        "text": "If your website is about recorded music, MP3 is the choice."
      },
      {
        "type": "table",
        "headers": [
          "Format",
          "File",
          "Description"
        ],
        "rows": [
          [
            "MIDI",
            ".mid<br>.midi",
            "MIDI (Musical Instrument Digital Interface). \nMain format for all electronic \nmusic devices like synthesizers and PC sound cards. MIDI files do not contain sound, but digital notes that can be played by electronics. \nPlays well on all computers and music hardware, but not in web browsers."
          ],
          [
            "RealAudio",
            ".rm<br>.ram",
            "RealAudio. \nDeveloped by Real Media \nto allow streaming of audio with low \nbandwidths. Does not play in web browsers."
          ],
          [
            "WMA",
            ".wma",
            "WMA (Windows Media Audio). Developed by Microsoft. Plays well on Windows computers, but not in \nweb browsers."
          ],
          [
            "AAC",
            ".aac",
            "AAC (Advanced Audio Coding). \nDeveloped by Apple as the default format for \niTunes. Plays well on Apple computers, but not in web browsers."
          ],
          [
            "WAV",
            ".wav",
            "WAV. \nDeveloped by IBM and Microsoft. Plays well on Windows, Macintosh, and Linux operating systems. \nSupported by \nHTML."
          ],
          [
            "Ogg",
            ".ogg",
            "Ogg. \nDeveloped by the Xiph.Org Foundation. Supported by HTML."
          ],
          [
            "MP3",
            ".mp3",
            "MP3 files are actually the sound part of MPEG files. \nMP3 is the most popular format for music players. Combines good \ncompression (small files) with high quality. Supported by all browsers."
          ],
          [
            "MP4",
            ".mp4",
            "MP4 \nis a video format, but can also be used for audio. Supported by all browsers."
          ]
        ]
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Only MP3, WAV, and Ogg audio are supported by the HTML standard.</p>"
      }
    ]
  },
  "video": {
    "title": "HTML Video",
    "blocks": [
      {
        "type": "intro",
        "text": "The HTML <code class=\"w3-codespan\">&lt;video&gt;</code> element is used to \nshow a video on a web page."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Video"
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <video> Element"
      },
      {
        "type": "paragraph",
        "text": "To show a video in HTML, use the <code class=\"w3-codespan\">&lt;video&gt;</code> element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<video width=\"320\" height=\"240\" controls>\n  <source src=\"movie.mp4\" type=\"video/mp4\">\n  <source src=\"movie.ogg\" type=\"video/ogg\">\nYour browser does not support the video tag.\n</video>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "How it Works"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">controls</code> attribute adds video controls, like play, pause, and volume."
      },
      {
        "type": "paragraph",
        "text": "It is a good idea to always include <code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">height</code> attributes. If height and width are not set, the page \nmight flicker while the video loads."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;source&gt;</code> element allows you to specify alternative video \nfiles which the browser may choose from. The browser will use the first recognized format."
      },
      {
        "type": "paragraph",
        "text": "The text between the <code class=\"w3-codespan\">&lt;video&gt;</code> and <code class=\"w3-codespan\">&lt;/video&gt;</code> tags will only be displayed \nin browsers that do not \nsupport the <code class=\"w3-codespan\">&lt;video&gt;</code> element."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <video> Autoplay"
      },
      {
        "type": "paragraph",
        "text": "To start a video automatically, use the <code class=\"w3-codespan\">autoplay</code> attribute:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<video width=\"320\" height=\"240\" autoplay>\n  <source src=\"movie.mp4\" type=\"video/mp4\">\n  <source src=\"movie.ogg\" type=\"video/ogg\">\nYour browser does not support the video tag.\n</video>"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Chromium browsers do not \nallow autoplay in most cases. However, muted autoplay is always allowed.</p>"
      },
      {
        "type": "paragraph",
        "text": "Add <code class=\"w3-codespan\">muted</code> after <code class=\"w3-codespan\">\nautoplay</code> to let your video start playing automatically (but muted):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<video width=\"320\" height=\"240\" autoplay muted>\n  <source src=\"movie.mp4\" type=\"video/mp4\">\n  <source src=\"movie.ogg\" type=\"video/ogg\">\nYour browser does not support the video tag.\n</video>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Browser Support"
      },
      {
        "type": "paragraph",
        "text": "The numbers in the table specify the first browser version that fully supports the \n<code class=\"w3-codespan\">&lt;video&gt;</code> element."
      },
      {
        "type": "table",
        "headers": [
          "Element",
          "",
          "",
          "",
          "",
          ""
        ],
        "rows": [
          [
            "&lt;video&gt;",
            "4.0",
            "9.0",
            "3.5",
            "4.0",
            "10.5"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Video Formats"
      },
      {
        "type": "paragraph",
        "text": "There are three supported video formats: MP4, WebM, and Ogg. The browser support for the different formats is:"
      },
      {
        "type": "table",
        "headers": [
          "Browser",
          "MP4",
          "WebM",
          "Ogg"
        ],
        "rows": [
          [
            "Edge",
            "YES",
            "YES",
            "YES"
          ],
          [
            "Chrome",
            "YES",
            "YES",
            "YES"
          ],
          [
            "Firefox",
            "YES",
            "YES",
            "YES"
          ],
          [
            "Safari",
            "YES",
            "YES",
            "NO"
          ],
          [
            "Opera",
            "YES",
            "YES",
            "YES"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Video - Media Types"
      },
      {
        "type": "table",
        "headers": [
          "File Format",
          "Media Type"
        ],
        "rows": [
          [
            "MP4",
            "video/mp4"
          ],
          [
            "WebM",
            "video/webm"
          ],
          [
            "Ogg",
            "video/ogg"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Video - Methods, Properties, and Events"
      },
      {
        "type": "paragraph",
        "text": "The HTML DOM defines methods, properties, and events for the <code class=\"w3-codespan\">&lt;video&gt;</code> element."
      },
      {
        "type": "paragraph",
        "text": "This allows you to load, play, and pause videos, as well as setting duration and volume."
      },
      {
        "type": "paragraph",
        "text": "There are also DOM events that can notify you when a video begins to play, is paused, etc."
      },
      {
        "type": "paragraph",
        "text": "For a full DOM reference, go to our <a href=\"../tags/ref_av_dom.html\">HTML Audio/Video DOM Reference</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Video Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_video.html\">&lt;video&gt;</a>",
            "Defines a video or movie"
          ],
          [
            "<a href=\"../tags/tag_source.html\">&lt;source&gt;</a>",
            "Defines multiple media resources for media elements, such as &lt;video&gt; and &lt;audio&gt;"
          ],
          [
            "<a href=\"../tags/tag_track.html\">&lt;track&gt;</a>",
            "Defines text tracks in media players"
          ]
        ]
      }
    ]
  },
  "audio": {
    "title": "HTML Audio",
    "blocks": [
      {
        "type": "intro",
        "text": "The HTML <code class=\"w3-codespan\">&lt;audio&gt;</code> element is used to \nplay an audio file on a web page."
      },
      {
        "type": "header",
        "level": 2,
        "text": "The HTML <audio> Element"
      },
      {
        "type": "paragraph",
        "text": "To play an audio file in HTML, use the <code class=\"w3-codespan\">&lt;audio&gt;</code> element:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<audio controls>\n  <source src=\"horse.ogg\" type=\"audio/ogg\">\n  <source src=\"horse.mp3\" type=\"audio/mpeg\">\n Your browser does not support the audio element.\n </audio>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Audio - How It Works"
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">controls</code> attribute adds audio controls, like play, pause, and volume."
      },
      {
        "type": "paragraph",
        "text": "The <code class=\"w3-codespan\">&lt;source&gt;</code> element allows you to specify alternative audio \nfiles which the browser may choose from. The browser will use the first recognized format."
      },
      {
        "type": "paragraph",
        "text": "The text between the <code class=\"w3-codespan\">&lt;audio&gt;</code> and <code class=\"w3-codespan\">&lt;/audio&gt;</code> tags will only be displayed \nin browsers that do not \nsupport the <code class=\"w3-codespan\">&lt;audio&gt;</code> element."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML <audio> Autoplay"
      },
      {
        "type": "paragraph",
        "text": "To start an audio file automatically, use the <code class=\"w3-codespan\">autoplay</code> attribute:"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<audio controls autoplay>\n  <source src=\"horse.ogg\" type=\"audio/ogg\">\n  <source src=\"horse.mp3\" type=\"audio/mpeg\">\n Your browser does not support the audio element.\n </audio>"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Chromium browsers do not \nallow autoplay in most cases. However, muted autoplay is always allowed.</p>"
      },
      {
        "type": "paragraph",
        "text": "Add <code class=\"w3-codespan\">muted</code> after <code class=\"w3-codespan\">\nautoplay</code> to let your audio file start playing automatically (but muted):"
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<audio controls autoplay muted>\n  <source src=\"horse.ogg\" type=\"audio/ogg\">\n  <source src=\"horse.mp3\" type=\"audio/mpeg\">\n Your browser does not support the audio element.\n </audio>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "Browser Support"
      },
      {
        "type": "paragraph",
        "text": "The numbers in the table specify the first browser version that fully supports the \n<code class=\"w3-codespan\">&lt;audio&gt;</code> element."
      },
      {
        "type": "table",
        "headers": [
          "Element",
          "",
          "",
          "",
          "",
          ""
        ],
        "rows": [
          [
            "&lt;audio&gt;",
            "4.0",
            "9.0",
            "3.5",
            "4.0",
            "10.5"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Audio Formats"
      },
      {
        "type": "paragraph",
        "text": "There are three supported audio formats: MP3, WAV, and OGG. The browser support for the different formats is:&nbsp;"
      },
      {
        "type": "table",
        "headers": [
          "Browser",
          "MP3",
          "WAV",
          "OGG"
        ],
        "rows": [
          [
            "Edge/IE",
            "YES",
            "YES*",
            "YES*"
          ],
          [
            "Chrome",
            "YES",
            "YES",
            "YES"
          ],
          [
            "Firefox",
            "YES",
            "YES",
            "YES"
          ],
          [
            "Safari",
            "YES",
            "YES",
            "NO"
          ],
          [
            "Opera",
            "YES",
            "YES",
            "YES"
          ]
        ]
      },
      {
        "type": "paragraph",
        "text": "*From Edge 79"
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Audio - Media Types"
      },
      {
        "type": "table",
        "headers": [
          "File Format",
          "Media Type"
        ],
        "rows": [
          [
            "MP3",
            "audio/mpeg"
          ],
          [
            "OGG",
            "audio/ogg"
          ],
          [
            "WAV",
            "audio/wav"
          ]
        ]
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Audio - Methods, Properties, and Events"
      },
      {
        "type": "paragraph",
        "text": "The HTML DOM defines methods, properties, and events for the <code class=\"w3-codespan\">&lt;audio&gt;</code> element."
      },
      {
        "type": "paragraph",
        "text": "This allows you to load, play, and pause audios, as well as set duration and volume."
      },
      {
        "type": "paragraph",
        "text": "There are also DOM events that can notify you when an audio begins to play, is paused, etc."
      },
      {
        "type": "paragraph",
        "text": "For a full DOM reference, go to our <a href=\"../tags/ref_av_dom.html\">HTML Audio/Video DOM Reference</a>."
      },
      {
        "type": "header",
        "level": 2,
        "text": "HTML Audio Tags"
      },
      {
        "type": "table",
        "headers": [
          "Tag",
          "Description"
        ],
        "rows": [
          [
            "<a href=\"../tags/tag_audio.html\">&lt;audio&gt;</a>",
            "Defines sound content"
          ],
          [
            "<a href=\"../tags/tag_source.html\">&lt;source&gt;</a>",
            "Defines multiple media resources for media elements, such as &lt;video&gt; and \n&lt;audio&gt;"
          ]
        ]
      }
    ]
  },
  "youtube": {
    "title": "HTML YouTube Videos",
    "blocks": [
      {
        "type": "intro",
        "text": "The easiest way to play videos in HTML, is to use YouTube."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Struggling with Video Formats?"
      },
      {
        "type": "paragraph",
        "text": "Converting videos to different formats can be difficult and time-consuming."
      },
      {
        "type": "paragraph",
        "text": "An easier solution is to let YouTube play the videos in your web page."
      },
      {
        "type": "header",
        "level": 2,
        "text": "YouTube Video Id"
      },
      {
        "type": "paragraph",
        "text": "YouTube will display an id (like tgbNymZ7vqY), when you save (or play) a video."
      },
      {
        "type": "paragraph",
        "text": "You can use this id, and refer to your video in the HTML code."
      },
      {
        "type": "header",
        "level": 2,
        "text": "Playing a YouTube Video in HTML"
      },
      {
        "type": "paragraph",
        "text": "To play your video on a web page, do the following:"
      },
      {
        "type": "list",
        "ordered": false,
        "items": [
          "Upload the video to YouTube",
          "Take a note of the video id",
          "Define an <code class=\"w3-codespan\">&lt;iframe&gt;</code> element in your web page",
          "Let the <code class=\"w3-codespan\">src</code> attribute point to the video URL",
          "Use the <code class=\"w3-codespan\">width</code> and <code class=\"w3-codespan\">\n height</code> attributes to specify the dimension of the player",
          "Add any other parameters to the URL (see below)"
        ]
      },
      {
        "type": "example",
        "title": "Example",
        "code": "<iframe width=\"420\" height=\"315\"src=\"https://www.youtube.com/embed/tgbNymZ7vqY\">\n</iframe>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "YouTube Autoplay + Mute"
      },
      {
        "type": "paragraph",
        "text": "You can let your video start playing automatically when a user visits the \npage, by adding <code class=\"w3-codespan\">autoplay=1</code> to the YouTube URL. \nHowever, automatically starting a video is annoying for your visitors!"
      },
      {
        "type": "note",
        "text": "<p><strong>Note:</strong> Chromium browsers do not \nallow autoplay in most cases. However, muted autoplay is always allowed.</p>"
      },
      {
        "type": "paragraph",
        "text": "Add <code class=\"w3-codespan\">mute=1</code> after <code class=\"w3-codespan\">\nautoplay=1</code> to let your video start playing automatically (but muted)."
      },
      {
        "type": "example",
        "title": "YouTube - Autoplay + Muted",
        "code": "<iframe width=\"420\" height=\"315\"src=\"https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=1&mute=1\">\n</iframe>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "YouTube Playlist"
      },
      {
        "type": "paragraph",
        "text": "A comma separated list of videos to play (in addition to the original URL)."
      },
      {
        "type": "header",
        "level": 2,
        "text": "YouTube Loop"
      },
      {
        "type": "paragraph",
        "text": "Add <code class=\"w3-codespan\">playlist=videoID</code> and <code class=\"w3-codespan\">loop=1</code> to let your video loop forever."
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">loop=0</code> (default) - The video will play only once."
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">loop=1</code> - The video will loop (forever)."
      },
      {
        "type": "example",
        "title": "YouTube - Loop forever",
        "code": "<iframe width=\"420\" height=\"315\"src=\"https://www.youtube.com/embed/tgbNymZ7vqY?playlist=tgbNymZ7vqY&loop=1\">\n</iframe>"
      },
      {
        "type": "header",
        "level": 2,
        "text": "YouTube Controls"
      },
      {
        "type": "paragraph",
        "text": "Add <code class=\"w3-codespan\">controls=0</code> to NOT display controls in the \nvideo player."
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">controls=0</code> - Player controls does not display."
      },
      {
        "type": "paragraph",
        "text": "<code class=\"w3-codespan\">controls=1</code> (default) - Player controls is displayed."
      },
      {
        "type": "example",
        "title": "YouTube - Controls",
        "code": "<iframe width=\"420\" height=\"315\"src=\"https://www.youtube.com/embed/tgbNymZ7vqY?controls=0\">\n</iframe>"
      }
    ]
  }
}