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

  • Home
  • SEARCH
  • 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 8495307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:32:17+00:00 2026-06-10T23:32:17+00:00

So i have this code: <p id=item_1> <div class=background displayInline deleteItemFromCart title=Delete item></div> some

  • 0

So i have this code:

<p id="item_1">
    <div class="background displayInline deleteItemFromCart" title="Delete item"></div>
    some text
</p>

Simple right? now what would happen if i would view the source in Chrome dev tools:

enter image description here

And as you can see for some reason <p> doesn’t contain anything any more.

If i would try to remove div text would be back in <p> tag again, so my best guess would be that <p> can’t contain any or just div elements?

EDIT Well it was stupid question, anyways now that i think about it i could have just used <ul> instead of <p> if i was going to build a list of things… Anyways thank you all for your help.

  • 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-10T23:32:19+00:00Added an answer on June 10, 2026 at 11:32 pm

    You’re right, <p> can just contain inline elements and text, but <div> is a block element.

    The inline elements are: a abbr acronym applet b basefont bdo big br button cite code del dfn em font i img ins input iframe kbd label map object q samp script select small span strong sub sup textarea tt var

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

Sidebar

Related Questions

I have this code <div id=main style=background:#aaaaaa;float:left;height:160px;margin:5px;position:relative;display:block;width:630px;> <div id=1 class=item style=background:#ffaacc;float:left;width:200px;height:150px;margin:5px;position:absolute;left:0px;top:0px;> </div> <div id=2
I have this HTML: <div class=row-fluid list-item-main-euvou-entradas> <div class=span1 list-item-main-euvou-entradas-colorcode green></div> <div class=span1 list-item-main-euvou-entradas-rank>1</div>
I have this code : HTML <div class="draggable_container"> <div id="draggable_1" class="draggable">&nbsp;</div> </div> CSS .draggable_container
I have this code $(.delete2).click(function() { $('#load2').fadeIn(); } I have dynamically added item via
Hi all I have this code to check if an item from a textbox
I have code like this protected void rptCategory_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType
I have the following code: SPList list = web.Lists[this.ListName]; SPListItem item = list.Items.Add(); now
I have this code in XAML <Grid x:Name=LayoutRoot Background=Transparent> <Grid.RowDefinitions> <RowDefinition Height=Auto/> <RowDefinition Height=*/>
I have a UL html list that looks like this: <div id=scroller> <ul> <li>item
So my list looks something like this: <div=list> <ul> <li class=page item>Parent 1 <ul>

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.