



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




HTML Tags HTML works in a very simple, very logical, format. It reads like you do, top to bottom, left to right. That's important to remember. HTML is written with TEXT. What you use to set certain sections apart as headings, subtitles, bold text, underlined text, etc is a series of tags. Tag Format
This is a paragraph.
The majority of HTML tags do require both an open and a close tag (a begin and end tag). Most are very easy to understand because the tag is obvious. Here are a few and what they do to text: **This text will appear bold** _This text will appear in italics_ This text will appear underlined Follow this rule: Always set the beginning and end tags at the same time, always placing them on the farthest end of the item being affected. In other words, the first tag in is the last tag out. For example: **_Strong and emphasis_** The tag is the first one in, and is the last tag out. Single Tags The open and close tag format dominates the majority of the available HTML tags, but there are tags that stand alone. Here are two useful ones: **** This command gives you a line across the page. (HR stands for Horizontal Reference.) The tag can also be modified using the following as a guide: Which will give the following results:
This Breaks the text and starts it again on the next line. Remember you saved your document as TEXT so where you hit ENTER to jump to the next line was not saved. In an HTML document, you need to denote where you want every Carriage return with a
. You can write your HTML by hand with almost any available text editor, including notepad that comes as a standard program with Windows. All you need to do is type in the code, then save the document, making sure to put an .html extension or an .htm extension to the file (for instance "mypage.html"). Open Notepad and type in the following: **
** Title of page **
** This line is a header **
** this line is a paragraph of text. **
** This text is bold **** Save the file as "mypage.htm". Start your Internet browser. Select "File>Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created ‐
Headings Headings are defined with the to tags. defines the largest heading. defines the smallest heading. This is a heading This is a heading This is a heading This is a heading This is a heading This is a heading Comments in HTML The comment tag is used to insert a comment in the HTML source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.
Note that you need an exclamation point after the opening bracket, but not before the closing bracket. The following example shows the use of a comment tag. **
** Title of page **
**
**** This line is a header **
** this line is a paragraph of text. **
** This text is bold **** The above code will look like this:
This line is a header This line is a paragraph of text. This text is bold What is a Hypertext link? A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination. There are two parts to a link: