Saturday, April 19, 2025

HTML Title and Comments

In one of the previous tutorials, we mentioned title element. It's used to name Web Page in the upper left corner of the browser and to use it when we are saving that page to the local device. Nothing special here.

Comments are extremely valuable while coding or programming. Think about them as internal documentation that will be inside web page visible to you and other programmers, but not directly visible to end users when they are browsing.

Comments are simple and short explanations. You will also find them in programming languages, not just in HTML and CSS. They are created using special codes, depending on programming language used.

In HTML comments are created in this way: 

<!-- This comment will explain code -->
<!-- a bit more -->

In browsers comments are visible if you go to "View Page Source" option, usually with right mouse click.

Important - think about security while creating comments, do not reveal internal stuff to end user.

In HTML they are usually used to mark sections of page and to explain stuff for other programmers. You can have them all over the place, between html elements.

<!DOCTYPE html>

<html>
<head>
	<title>Title of The Page</title>
	<meta charset="utf-8">
</head>

<body>

	<!-- This comment will explain code -->
	<!-- a bit more -->
	
	<p>Actual Content</p>

</body>
</html>

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...