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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:00:39+00:00 2026-05-22T15:00:39+00:00

For an example Is <a href=#><h1>Heading</h1></a> valid in HTML5?

  • 0

For an example

Is <a href="#"><h1>Heading</h1></a> valid in HTML5?

  • 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-22T15:00:40+00:00Added an answer on May 22, 2026 at 3:00 pm

    yes what you’ve written is valid in HTML5, but it’s not all inline elements, I think it’s just <a> ‘s it applies to..

    Reference: “Block-level” links in HTML5

    Tip: if using this set the <a> to display: block; or there may be unintended visual styling results : Source: Test Case

    Update:

    It is "disallowed" for other "block in inline" combinations where "default styles are likely to lead to confusion" – explanation is here:

    Cases where the default styles are likely to lead to confusion

    Certain elements have default styles
    or behaviors that make certain
    combinations likely to lead to
    confusion. Where these have equivalent
    alternatives without this problem, the
    confusing combinations are disallowed.

    For example, div elements are rendered
    as block boxes, and span elements as
    inline boxes. Putting a block box in
    an inline box is unnecessarily
    confusing; since either nesting just
    div elements, or nesting just span
    elements, or nesting span elements
    inside div elements all serve the same
    purpose as nesting a div element in
    a span element
    , but only the latter
    involves a block box in an inline box,
    the latter combination is disallowed.

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

Sidebar

Related Questions

Take this code snippet for example: window.location.href = 'mysite.htm#images'; Already being on the site
For example, User adds this iamsmelly.com. And if I add an href to this,
I need to catch the content of href using regex. For example, when I
$.get('example.com',function(data){ link = $(data #someid).attr(href) // how to do this??? }) I load a
In this example, what's the regexp to to extract 'first' from location.href, such as:
for example <a href=http://stackoverflow.com class=selected>stackoverflow</a> my jquery is here alert($('.selected').attr('href')); but this don't work
on the following URL: www.example.com/page/#2221 Chrome will return www.example.com/page/# for document.location.href Firefox will return
Is it possible to match all links without href specified via CSS? Example: <a>Invalid
Would this be considered bad practice? unless Link.exists?(:href => 'example.com/somepage') Domain.where(:domain => 'example.com').first.links.create(:href =>
Example <a href=example.html>Example Name</a> I would like to get Example Name I know I

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.