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 6676007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:55:57+00:00 2026-05-26T03:55:57+00:00

I have multiple paragraphs of text in an HTML document. Also, at various points,

  • 0

I have multiple paragraphs of text in an HTML document. Also, at various points, some of the text is wrapped in <h6></h6> tags, which is meant to apply certain font effects. In my CSS, the h6 tag is set to display:inline; so the paragraph keeps going continuously without a line break. This works except for the first instance of h6 on each page it is used: there is always a line break before the first element. Does anyone know why/how to prevent this?

CSS:

h6 {
    font-family:'Courier New',Courier,'Nimbus Mono L',monospace;
    font-size:125%;
    display:inline;
}

HTML:

As expected, not a lot was accomplished (in this plane) over a
five-day weekend when much of it was devoted tot he college
process. However, I'm down to only a handful of HTML-validation
errors. A couple of which are going to be particularly problematic,
dealing with my new <h6>Lytebox JavaScript</h6> I talked about
earlier: to enable Lytebox on an image, you give it a CSS tag
<h6>data-lyte-options</h6>...

The second essence of h6 works fine, but there is a line break before the first.

  • 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-05-26T03:55:58+00:00Added an answer on May 26, 2026 at 3:55 am

    Heading elements can’t be contained inside paragraphs, because inherently they’re treated as block-level elements hence browsers break paragraphs when they get to a block-level element like heading.

    Your particular HTML gets changed to this by browsers:

    <p>
    As expected, not a lot was accomplished (in this plane) over a
    five-day weekend when much of it was devoted tot he college
    process. However, I'm down to only a handful of HTML-validation
    errors. A couple of which are going to be particularly problematic,
    dealing with my new
    </p>                           <!-- browsers end a paragraph here!!!!! -->
    <h6>Lytebox JavaScript</h6>
    I talked about earlier: to enable Lytebox on an image, you give it a CSS tag
    <h6>data-lyte-options</h6>
    ...
    <p></p>
    

    I found a reference to this fact in HTML specification:

    The P element represents a paragraph. It cannot contain block-level elements (including P itself).

    And another reference that talks about block-level elements:

    Style sheets provide the means to specify the rendering of arbitrary elements, including whether an element is rendered as block or inline. In some cases, such as an inline style for list elements, this may be appropriate, but generally speaking, authors are discouraged from overriding the conventional interpretation of HTML elements in this way.

    Solution?

    The problem is that you’re using headings as usual paragraph text (with its own style). You should be using SPAN elements instead to make your HTML valid.

    If all you’d like to do is to format your text to be displayed as code then you can also use CODE element which should be used exactly for this purpose.

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

Sidebar

Related Questions

I have a long string (multiple paragraphs) which I need to split into a
I am writing an application in rails. I have multiple paragraphs of dynamic text
We have multiple MFC apps, which use CMutex( false, blah ), where blah allows
I have multiple classes that all derive from a base class, now some of
I have multiple logos of various companies in various formats that needs to be
I am using jquery to sort through multiple paragraphs. Currently I have it set
My db table will have a col a TEXT with long strings, like multiple
I'm transforming some XML, which I have no control over, to XHTML. The XML
Here's the problem. I have a bunch of large text files with paragraphs and
I have multiple texts fields every field is paragraph of text and I want

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.