Two HTML Elements Overlapping Each Other

Q

Can Two HTML Elements Partially Overlap Each Other?

✍: FYIcenter.com

A

No, two elements can not partially overlap each other. One element must be completely enclosed inside the other element. See the following two examples:

  <!-- Valid: "em" is enclosed inside "strong" --> 
  <p>There was once upon <strong>a time a <em>peasant-
    woman</em> who had a daughter</strong> and a step-
    daughter.</p>
 
  <!-- Invalid: "em" is partially overlapped 
    with "strong" -->
  <p>There was once upon <strong>a time a <em>peasant-
    woman</strong> who had a daughter</em> and a step-
    daughter.</p>	

 

Introduction of HTML Element Content Syntax

⇒⇒HTML Tutorials

2017-02-20, 173👍, 0💬