The HTML code, called the source code, that is behind a web page is a way to mark up a document by labeling its logical parts. Programmers get annoyed with this use of the word code. HTML is not anywhere near being a programming language!
You use tags to label the headings, normal paragraphs, lists, and special sections, like quotes, addresses, tables, hyperlinks, forms, and frames.
A tag is made by writing the name of the tag between the angled brackets < and >, like <html> and <p>. Most tags come in pairs, an opening tag and a closing tag. The closing tag has a forward slash, like </html> and </p>.
Let's look at the basic tags now. In the next lesson you will see what it looks like when the tags are put together with text to make a web page.
can be written with upper case, lower case, or even mixed case. In these
lessons, examples of HTML code will use lower case, like
It is smarter to stick to lower case when writing HTML code for three reasons.
Project 2: HTML Basics
Most HTML tags come in pairs, an opening tag and a closing tag. They
surround and contain the part that they are labeling, like:
Document structure tags:
There are many other structural parts, like numbered lists, bulleted lists, addresses, quoted material, tables, etc. Some of these will be discussed later.
When discussing a paired tag, it is usual to just use the opening tag in the sentence and to drop the < and > symbols, like "The BLOCKQUOTE tag is often mis-used to create an indention."
These tags let you change the look of your text. They are being replaced with Cascading Style Sheets (CSS), which is an advanced topic.
A few tags do not have a closing tag in HTML. They stand alone.
Some tags do not label parts of the document itself. They give important information to the browser. They do not do anything to the page that you see in your browser.
What Can Contain What?
Block elements are the tags that define sections of the document and, generally, start a new line. This includes all the headings, the paragraph tag, lists, and tables.
Tags that are not block elements, are called inline elements. These include the logical and character formatting tags.
When a tag contains other tags, we say that the tags are nested.
Rules on Containment:
In some browsers, breaking these rules can make parts vanish from your page!
Example: To display the sentence - This is hard!
~~ 1 Cor. 10:31 ...whatever you do, do it all for the glory of God. ~~