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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:25:32+00:00 2026-06-09T01:25:32+00:00

For example, if we have <html> <head> <title>FooBar</title> </head> <body></body> </html> If we do

  • 0

For example, if we have

<html>
    <head>
        <title>FooBar</title>
    </head>
    <body></body>
</html>

If we do document.getElementByTagName("title").TagName, then we will have TITLE (uppercase). While the html standards recommends writing html tags in lowercase.

I know there is no relationship between both, but this still doesn’t make sense.

Is there any reason that DOM should return tag names in uppercase?

  • 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-09T01:25:34+00:00Added an answer on June 9, 2026 at 1:25 am

    Technically, this is mandated in DOM Level 1:

    The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.

    The convention of uppercase tag names probably stems from legacy, when HTML was previously developed based on SGML, and element types were declared in uppercase. See this section of the HTML 4.01 spec discussing SGML, HTML and its syntax, as well as for example the HTML 4.01 Strict doctype definition. Any DOM implementations supporting HTML would follow suit.

    Note that lowercase tag names are only explicitly required in XHTML (but not XML), and authors are generally recommended to write lowercase tags for easy porting between HTML/XHTML, as well as improving readability. However, this recommendation doesn’t occur in the spec; all it says is that tag names are case-insensitive only in HTML as opposed to XHTML and XML.

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

Sidebar

Related Questions

I have a string which looks like: <html><head><title>example</title></head><body>some example text</body></html> I get this string
I have an HTML doc that looks roughly like this: <html> <head><title>Example</title></head> <body> <div
Assuming I have the following ASP.NET HTML Code: <html> <head><title>Test Page</title></head> <body id=bodyID> <asp:Label
I have a number of elements with the same class like this: <html> <head><title>example</title>
Consider a document in the following format: <!DOCTYPE html> <html> <head> <title></title> <body> <div
I have the following html: <!DOCTYPE html> <html> <head> <script src=http://code.jquery.com/jquery-latest.js></script> </head> <body> <span>not
Assume I have the following html: <html> <head> </head> <body> <div id=wrapper > <div
Suppose we have the following HTML file: <html xmlns=http://www.w3.org/1999/xhtml> <head> <title>Test iframe download</title> <script
I have the following page: <html> <head> <title>Kahil</title> <link rel=stylesheet type=text/css href=csshorizontalmenu1.css /> </head>
I have html like so: <div class=foo> (<a href=forum.example.com>forum</a>) <p> Some html here.... </div>

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.