Get or Set HTML of element with .html()


Description: Get the HTML for the first matched element or you can set one or more HTML for every matched element.


    <!doctype html>
    <html lang="en">
      <meta charset="utf-8">
      <title>html demo</title>
      <script src=""></script>
            bitsyCode('div').html("This <b>HTML</b> has been added through BitsyCode"); // SET HTML
            var divHTML = bitsyCode('div').html(); // RETRIEVE HTML


This HTML has been added through BitsyCode
  • Usage

    • How to use:

      html allows you to get or set HTML content of an element.

    • USAGE:

      bitsyCode('element').html("your HTML content here");
  • Options

    • What options are there:

      There are no options for this method.

  • Returns

    • specifying HTML() with no specified HTML content, will return the HTML of the element.