Introduction to HTML
Introduction to HTML
The first thing you need to do to begin your website is to create a file named index.html to do this you will open your text editor, open a new file and save it as index.html. Keeping your index.html open we will begin our work by creating the basic html tags.
HTML BasicsBefore I get started, you should know that HTML code almost always uses beginning and ending tags. These tags surround the text that will be affected by the code.
A beginning tag is generally a word surrounded by brackets. The closure tag is surrounded by the same brackets but with a forward slash right after the opening bracket.
For example, if you want to bold a portion of a sentence, then you would use <b> for the opening tag and </b> for the closing.
Let’s say you want to bold the word "Hello!" in the sentence below. Then your HTML code would look like this:
<p><b>Hello!</b> My name is William.</p>
The output would be:
Hello! My name is William.
Only the word "Hello!" is bolded because the tags surround that word. If you wanted to bold the entire sentence, then you would have put the closure tag, </b>, after the word "Carla". Be sure to always include your closing tag because if you forget, your entire page will be affected by the tag.
You can apply this same concept to many other HTML codes. Here are several of the basics...
Basic Text & Font Tags
New Paragraph: <p> Starts a new paragraph and creates a blank line between your new paragraph and the one above it.
The closing tag is </p>, but is not mandatory.
Line Break: <br> This will break your text to the next line. Two <br> tags is equivalent to one <p> tag. There's no closing tag needed for this one.
Bold: <b> Closing tag is </b>
Underline: <u> Closing tag is </u>
Italics: <i> Closing tag is </i>
Centering text: <center> Closing tag is </center>
Left aligning text: <p align="left"> Just use </p> for the closing tag
Right aligning text: <p align="right"> Just use </p> for the closing tag
Change text color: <font color="red"> The ending for any font tag is </font>
If you want more colors, you can also use hex codes .
Changing font face: <font face="Arial">
Change font size: <font size="3"> (choose between 1 and 7)
Blinking Text: <blink> </blink> (only works in Netscape)
Scrolling Text: <marquee> </marquee> (only works in Internet Explorer)
Set as favorite
Bookmark
Email This
Hits: 240
Comments (0)

Write comment
| Next > |
|---|
Donations
Donations are greatly appreciated and allow us to continue developing new extensions and templates.
