Golden Py Code? Really? No, it was the HTML5 Silly

As old timers know, "golden code" occurs when you add new lines into your program and it nonetheless works without bugs, right out of the box.

So when it happened to me, I was kind of shocked.

But in hindsight, it wasn't the Python aspects of my changes that worried me. It was the HTML. Or more precisely it was the new HTML5 syntax that had me worried. The Python code was straightforward. But for the HTML aspects, things had changed quite a bit since I last delved into HTML code some 30-40 years ago. This wasn't my grandfather's HTML anymore!

THE NEW HTML"5" AND CSS MARKUPS
It seems that one can stick many codes int
o almost any kind of tag now a days.

In particular, the "id=" statement, followed by a name string in quotes (but no spaces) can go anywhere to provide a spot that will be found by appending a hash tag and the name after the URL. See (here, a video) about the "id=" parameter --also known as the 'name fragment'.

(Note to myself: Alter the Py code of current program-under-development (PUD) to reference "top_of_page", "mid_of_page", "bot_of_page" where last one will point to the MORE TO EXPLORE section of text in the page (not to confuse with words seen in an imported image!))

One fairly old video discusses how to validate the syntax of your HTML5 code (here).

Of course, the W3 Schools site provides a lookup list tutorials for all the HTML5 codes (here) and (here) respectively.

Geeks-for-Geeks also provides a listing of all the tags (here) and tutorials (example here)

More generally, you can ask Google for what's new in HTML5 (here)

For me, and my current worry about the id=name element, check out this video (here) or more generally (here)
The W3 School video re the id= attribute is (here) --can be used on ANY HTML element


MORE TO EXPLORE
(1) Google search results: What is new in HTML5 over older HTML
(2) Geeks for Geeks -- Difference between HTML and HTML5
(3) Simple HTML Studio -- videos
(4) Reddit -- r/LearnHTML
question for Google or ChatGPT


Comments

Popular posts from this blog

Links for Python Noobs

Welcome to Circular Import Hell

I Lied