News & UpdatesProgrammingWeb programming Store My Projects
Links
Affiliates

HTML Tutorial – 02 – Tags

The markup that defines HTML is called tags. For example, the break tag <br> is used to make a line break. All tags are delimited by angle brackets (<>) and are case-insensitive.

Most tags, such as the paragraph <p>, have both a start and an end tag with content in between.

<p>...</p>

The end tag always has the same name as the start tag, but includes a forward slash before the tag’s name. This combination of start tag, content and end tag is called an element, in this case a paragraph element. Keep in mind that the words element and tag are sometimes used interchangeably.

Attributes and values

Start tags may contain different attributes and values, which are also case-insensitive. The quotes around the value are only required if the value includes whitespace or special characters, but it is a good practice to always include them.

<p align="center">...</p>

Deprecated tags and attributes

As HTML has evolved many of its elements and attributes have become deprecated and should no longer be used. Particularly, all elements and attributes relating to styling (instead of structure) have become deprecated in favor of CSS, which is the style language that complements HTML.

Recommended additional reading:
Sams - Teach Yourself HTML and CSS in 24 Hours