Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2011
    Posts
    705

    Question why this tag is red signal?

    http://my.jetscreenshot.com/demo/20130923-uj7t-69kb.jpg

    </p> tag is wrong, but why? Please explain me

  2. #2
    Join Date
    Feb 2006
    Location
    Kepler 62f
    Posts
    14,873
    I'm guessing it's not closed.
    || Need a good host?
    || See my Suggested Hosts List || Editorial: EIG/Site5/Arvixe/Hostgator Alternatives
    ||

  3. #3
    Join Date
    Oct 2012
    Location
    Europe and USA
    Posts
    922

    Re: why this tag is red signal?

    Because adding divs inside paragraphs isn't correct. Although the browsers may render them correctly, it isn't correct in HTML coding standards. You can include paragraphs inside divs but not the opposite. As soon as you remove the <p> or the <div> the code will be fine.
    Network Panda :: Web Hosting SSD Powered :: Reseller Hosting
    Instant activation, fast servers, SSD disks, cPanel, Softaculous 1-click apps installer, daily backups, SSL certificates
    Multiple hosting locations: USA, Canada, France, UK, Germany, Italy, Spain, Poland, Finland

  4. #4
    Join Date
    Oct 2010
    Posts
    4,694
    It's a closing tag without a matching opening tag. Not a disaster in some standards of HTML, but very bad if you're trying to use XHTML or stricter HTML.
    James

    Interested in which hosts I'd recommend? Unmanaged VPS Reviews | Managed VPS Reviews

  5. #5
    Join Date
    Jul 2011
    Posts
    705
    Quote Originally Posted by kpmedia View Post
    I'm guessing it's not closed.
    You advised, need to remove </p> tag ??

  6. #6
    Join Date
    Feb 2006
    Location
    Kepler 62f
    Posts
    14,873
    Quote Originally Posted by NetworkPanda View Post
    Because adding divs inside paragraphs isn't correct. Although the browsers may render them correctly, it isn't correct in HTML coding standards. You can include paragraphs inside divs but not the opposite. As soon as you remove the <p> or the <div> the code will be fine.
    From what I've read, HTML5 makes a mess of the before/after rules.
    || Need a good host?
    || See my Suggested Hosts List || Editorial: EIG/Site5/Arvixe/Hostgator Alternatives
    ||

  7. #7
    Join Date
    Jul 2011
    Posts
    705
    Quote Originally Posted by NetworkPanda View Post
    Because adding divs inside paragraphs isn't correct. Although the browsers may render them correctly, it isn't correct in HTML coding standards. You can include paragraphs inside divs but not the opposite. As soon as you remove the <p> or the <div> the code will be fine.
    <p>
    <a onclick="return hs.htmlExpand(this)"><img class="joomx-q-img" src="/clientscript/img/what.png"></a>


    <div class="joomx-jloading">

    <h2>why this program question?</h2>
    <ul>your program questions and answers are required for owner verification.</ul>
    </div></p>
    This is my coding, so what is correct right now?

  8. #8
    Join Date
    Oct 2010
    Posts
    4,694
    Quote Originally Posted by ruba View Post
    You advised, need to remove </p> tag ??
    It's very hard to say without seeing the whole page. Is this from a template?

    There are other issues there as well - <ul> tags without any <li> inside them. It looks like a template / HTML page with quite a few flaws in it, but we'd need to know who the author is (do you fix it, or ask them to) and what it's there for. If you wrote it yourself, spend some time on a site like http://www.htmldog.com/reference/htmltags/. If you bought it / downloaded it, maybe it isn't the best template to be using.
    James

    Interested in which hosts I'd recommend? Unmanaged VPS Reviews | Managed VPS Reviews

  9. #9
    Join Date
    Apr 2011
    Location
    Core Files
    Posts
    7,782
    Quote Originally Posted by NetworkPanda View Post
    Because adding divs inside paragraphs isn't correct. Although the browsers may render them correctly, it isn't correct in HTML coding standards. You can include paragraphs inside divs but not the opposite. As soon as you remove the <p> or the <div> the code will be fine.
    ^^^^ That and the tag closes line 3, which is outside the div

  10. #10
    Join Date
    Apr 2003
    Location
    Atlanta, Jawja
    Posts
    3,066
    You need to provide the actual text in your post, not as an image. I know what needs to be fixed, but I'm not going to type out all of the correct code.
    Douglas Hazard - Certifiable Sports Junkie and Sports Community Enthusiast

    Host of Two Cents Radio - Follow @TwoCentsRadio on Twitter (@BearlyDoug on Twitter)

  11. #11
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,948
    Quote Originally Posted by 48-14 View Post
    ^^^^ That and the tag closes line 3, which is outside the div
    ^^ this is the correct answer. The </p> is in the wrong place in that image.
    Having problems, or maybe questions about WHT? Head over to the help desk!

Similar Threads

  1. Why this red signal
    By ruba in forum Web Hosting
    Replies: 2
    Last Post: 09-04-2013, 06:18 AM
  2. Replies: 0
    Last Post: 09-03-2012, 08:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •