Archive for the ‘Elements’ Category

How to Save WebP as JPG and Check the Export

I made two files with .jpg names for this example. One was a real JPEG; the other still contained WebP data. Here is how to save WebP as JPG properly: open it in GIMP, choose File → Export As, enter a fresh .jpg filename and confirm JPEG. Then open the exported copy. The file with […]

Font Pairing Guide: Which Fonts Go Together in CSS?

My test line was “Fix it on Saturday”. At the same size, three bold faces needed roughly 473, 512 and 611 pixels to set those words. That difference is why I start a font pairing guide with the page’s actual text. For this repair cafe notice, Georgia above Arial is my starting pair. You can […]

How to Center Text in HTML: CSS Examples and Fixes

To center text in HTML, apply the CSS declaration text-align: center; to the block containing the text. For example, <p style=”text-align: center;”>Hello</p> centers that paragraph’s text horizontally. Use CSS for new work; the old center element is obsolete. The common source of confusion is what you want to move. Centering the words inside a box, […]

How to Convert HTML to PDF: Browser and Code Examples

To convert HTML to PDF once, open the page in a browser, choose Print and select a PDF destination. For repeated exports, use an HTML rendering tool such as Puppeteer or WeasyPrint. Renaming an .html file to .pdf does not convert its contents. The right method depends on the document. A receipt that is already […]

Is HTML a Programming Language? A Practical Answer

HTML is usually classified as a markup language, not a general-purpose programming language. It describes a document’s content and meaning. It does not provide the variables, functions and control flow you would use to write a typical program. JavaScript can add that kind of logic to a web page. That short answer needs a qualification. […]

What Does HTML Stand For? The Name Explained

HTML stands for HyperText Markup Language. A browser uses it to make sense of a web document. Which words form the heading? Where does a paragraph finish? Which text is a link? HTML marks those roles. Once you have seen a few lines of source, the long name becomes much easier to remember. Need the […]

What Is HTML? A Beginner’s Guide with a Working Example

HTML stands for HyperText Markup Language. It gives a web page its structure and meaning. Which words are a heading? Where does a paragraph start? What does a link point to? HTML marks out those parts so a browser can put the page together. Wondering “what is HTML?” because you want to make a website? […]

HTML5 Audio Autoplay Loop: Background Music Guide

To create an HTML5 audio autoplay loop background player, you need an <audio> element, the loop attribute and a way for users to adjust or stop the sound. Add autoplay to request an automatic start. Some browsers will still prevent audible media from playing automatically. Starting and repeating are separate jobs. HTML can repeat a […]

Computer says NO to HTML5 document outline

What a brilliant idea! For the longest time HTML5 specified, and advised developers, that it no longer mattered what the number (1 to 6) was in a heading element (when used in conjunction with sectioning elements). What mattered was the nesting level of the H1-h6 in sectioning elements, just like the X<H>TML promised land, but […]