Comments and Special Characters

In this lesson, students will learn how to put the finishing touches on their HTML content by using good commenting practices and incorporate special characters using ampersand notation.

(you can right click and select "view page source" to see comments and ampersand notation used within this lesson)

Key Words:

comments
ampersand notation


Finishing Touches

While your designs thus far have been basic layouts, you'll find as things grow more complex, it would be useful to leave yourself (and others) notes on what certain sections of code do. HTML, and most other computer languages, have this capability. These coded notes are known as comments. In the following pages, we'll discuss when comments come in the most handy, and how to avoid abusing this feature so it doesn't end up doing more harm than good.

two people typing on laptops

After that, you'll learn about what to do when you need specific text characters that aren't available on your keyboard. With coding combinations called ampersand notation, you'll be able to add characters to your webpage text that are used to improve the presentation of writing, to add accent marks required in certain languages, and to even write out mathematical equations.
Both of these techniques fall outside of the typical tag format most of HTML adheres to. But both are also great ways to add finishing touches to your written content, and make the meaning of your content as clear as possible.


Commentary on Comments

Comments are a great tool for clarifying pieces of code for yourself and others.

An HTML comment tag opens with the character combination as seen below

Here are some examples where you should or could use comments:

Get in touch with us!

Phone (555)555-5555
Email email@service.com
Address 10 Street Rd.
Cityville, MD 99999
  1. Section 1
  2. Section 2
  3. Section 3
    1. Chapter 1
    2. Chapter 2
      1. Pages 120 to 150
      2. Pages 150 to 180

Ampersand Notation: Jake's example

Sometimes your webpage’s text content needs characters that you can’t just type.

for example, we are frequently using the characters <, and > to write tags. So how would we write out the tag for a paragraph and not have it parsed?

"You can take a look at page 5-7 of 9 in the Comments and Special Characters lesson for more information on certain symbols and characters, or here on this website link"



Characters for Languages:


Characters for Math: