Required Sub-elements in HTML

Q

What Is a Required Sub-element?

✍: FYIcenter.com

A

A required sub-element is a sub-element that you must included in the parent element. Most sub-elements are optional. But there are some sub-elements that are required by their parent elements.

Here are two good examples:

  <!-- Valid: "head" requires "title" -->
  <head>
    <title>HTML FAQs by FYIcenter.com</title>
  </head>

  <!-- Valid: "ul" requires "li" -->
  <ul>
    <li>Hope you like it.</li>
  </head>

 

Introduction of HTML Element Content Syntax

⇒⇒HTML Tutorials

2017-02-20, 183👍, 0💬