new hr html code example

Example 1: hr css mdn

/* Answer to: "hr css mdn" */

/*
  The HTML <hr> element represents a thematic break between
  paragraph-level elements: for example, a change of scene in a
  story, or a shift of topic within a section.

  Here's the documentation to this <hr> (Horizontal Rule) tag:
  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr
*/

Example 2: how to draw a horizontal line in javascript

var elem = document.createElement("hr");
elem.setAttribute("width", "100px");
document.body.appendChild(elem);

Tags:

Html Example