Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8186463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:12:33+00:00 2026-06-07T02:12:33+00:00

So I have been a CLI or Cron developer in PHP for most my

  • 0

So I have been a CLI or Cron developer in PHP for most my career and now I am learning why I did not like UI work in school 😉 I am dealing with HTML5 validation here and I am not finding an answer to a question that is for curosity. I ran the W3C HTML5 validation on my home page and I got several errors around a div being within a <span> and that is not allowed. I tried changing all <div> within spans to a <p> but recieve pretty much the same error. http://www.w3schools.com/html5/tag_span.asp does not explicitly say what elements are allowed within a <span> and neither does the error from the validator:

Line 85, Column 69: Element p not allowed as child of element span in
this context. (Suppressing further errors from this subtree.)

2 questions:

1) What elements if any are allowed within a <span>?

2) Where can I reference for what elements are allowed within another? I have googled but see nothing that has a “W3C” stamp on it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:12:35+00:00Added an answer on June 7, 2026 at 2:12 am

    Only inline elements may be contained within inline elements. span is an inline element. So, tags like a, img, sup, etc. can go within a span, but block level elements like div and p cannot.

    UPDATE

    In reality, different elements which default to inline display behave differently. Some “inline” elements may allow block elements (a for example), while others don’t (like span).

    If you’re interested in what an HTML tag may contain, your most official source is the WHATWG page on HTML elements. You can check any HTML element and see what content is permitted (see ‘Content Model’ for each element):

    http://www.whatwg.org/specs/web-apps/current-work/multipage/#auto-toc-4

    Here’s the definition of the span tag, which indicates that only ‘phrasing’ content is allowed.

    http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-span-element

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a bunch of cli cron style scripts that are coded in php.
I have been researching how to create a hybrid winform and CLI app... I
I have been working with SQL Server as a Developer a while. One thing
I have been using TortoiseSVN for some time and I really like it. I
some methods in our model pojos have been annotated like this: @Column(name=cli_clipping_id, updatable=false, columnDefinition
I have been keeping up with .NET CLR for awhile now, and my language
Variations of this question have been asked, but not specific to GNU/Linux and C.
I have been trying to do this: $handle = popen('php -q nah.php?part='. $part .
I have 55 php files that I would like to run simultaneously from the
I have a multithreaded cli downloader for ubuntu called Aria2c. I've been trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.