Solved: html uppercase

The main problem with HTML uppercase is that it can be difficult to read.

<!DOCTYPE html>

<h2>HTML uppercase</h2>
<p id="demo"></p>

var x = document.getElementById("demo");  // Find the element with id="demo"
x.innerHTML = x.innerHTML.toUpperCase();   // Convert the content to uppercase


The first two lines create an HTML document. The declaration defines this document to be HTML5. The element is the root element of an HTML page. The element contains the visible page content.

The next two lines create a heading and a paragraph:


element defines a heading.

element defines a paragraph.
The id attribute specifies a unique id for an HTML element (the value must be unique within the HTML document).
The innerHTML property gets or sets the HTML content (innerHTML) of an element.
In this example, we use the innerHTML property to convert the content of the

element to uppercase letters:

How to display uppercase text

To display uppercase text in HTML, use the tag. For example:


This will display “Hello.”

CSS text-transform property

The text-transform property can be used to change the text formatting of an element. This property can be used to change the font, size, and color of the text.

Related posts:

Leave a Comment