Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Want-to-start Html Tutorials, An HTML tutorial that covers the basics
Advanced Composing
You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Total Votes: 7
Guests cannot vote 
Propeng
post Jan 3 2008, 08:32 PM
Post #1


Newbie
*

Group: Members
Posts: 3
Joined: 3-January 08
Member No.: 55,668



NOTE: Don't use a rich text editor* for writing HTML code! Use Notepad in Windows, SimpleText in Mac or TextEdit in OSX, but you must set the following preferences for the HTML code to work!
  1. In the Format menu, select Plain Text.
  2. Open the preferences window from the Text Edit menu, then select "Ignore rich text commands in HTML files."

Start Creating Your Own HTML File

You can either use HTM or HTML file extensions. For more information, visit: http://filext.com/file-extension/htm for HTM or http://filext.com/file-extension/html for HTML.

Open your text editor, then type:

HTML
<html>
<head>
<title>127.0.0.1 - My Test Page</title>
</head>
<body>
This is a test <b>H</b> <i>T</i> <u>M</u> <s>L</s>!
</body>
</html>


Save the HTML file as "test.html". In your browser, click "Open..." under the File menu. Select the file you've just saved, then click OK. The browser will display:

This is a test H T M L!

Firstly, the <html> tag tells your browser that this is the start of the page. The text between the <head> and the </head> tags is the header information that will be displayed in your browser. The text in the <title> and the </title> tags is the title of your page. The text between the <body> and the </body> tags is the main content of your web page. The rest of the tags are displayed in the next section.
Basic Tags
There are lots of tags in HTML, but we'll only cover the basic ones now.
  • <b> - Bold
  • <i> - Italic
  • <u> - Underline
  • <s> - Strikeout
  • <br /> - HTML doesn't preserve line breaks in code, so this tag is used to insert a line break. There's no closing tag for it.
  • <del> - Same as Strikeout. Old browsers will ignore this tag.
  • <ins> - Same as Underline. Old browsers will ignore this tag.
  • <hr /> - Displays a horizontal rule. There's no closing tag for it.
  • <p> - A paragraph. (Usually put around a long block of text.)

<font> Tag
The <font> tag is used to set the font type and size of a text. It has two normal arguments which can be used all of them or one only. They are face="" and size="". The face argument is used to set the font type & the size argument is used to set the font size. The unset text is Times New Roman with font size 3.

Headers
In HTML, there are some pre-configured headers to use. Use numbers from 1 to 6, for example:

HTML
<h1>This is a header</h1>
<b><font size="6">This is another header</font></b>


There's no difference between the two lines. But in the first line, the <h1> tag is used. In the second line, the <font> and the <b> tag is used manually to set the size.

To be continued...
Go to the top of the page
 
+Quote Post
truefusion
post Jan 4 2008, 03:31 AM
Post #2


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,864
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528
T17 GFX Crew



QUOTE(Propeng @ Jan 3 2008, 03:32 PM) *
There's no difference between the two lines. But in the first line, the <h1> tag is used. In the second line, the <font> and the <b> tag is used manually to set the size.

Actually, there is. Some browsers, if not all, place a pre-defined margin or padding in headings, while in font elements there is none unless otherwise specified by the designer or coder.

Check it out:
HTML
<h1>heading</h1>
some text.
<p>
<b><font size="6">This is another header</font></b><br/>
some text
</p>
Go to the top of the page
 
+Quote Post
rvalkass
post Jan 4 2008, 11:24 AM
Post #3


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,054
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



The tags <b> and <i> should also no longer be used. It is much better to use <strong> and <em> as they are more semantically correct and are better understood by all browsers (text based, screen readers, and other such things). Bold and italics are not always used for strength and emphasis, and could therefore get ignored if they cannot be displayed.

You also need a DOCTYPE declaration at the start of all HTML documents:

HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


That way, all browsers should interpret your code correctly, as long as the browser has been written to follow the standards right.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Tutorials(2)
  2. HTML tags and examples(37)
  3. Basic Html (for Us Kids)(23)
  4. Multiple Classes In Html(8)
  5. Learning Vb(5)
  6. How To Create Html Page Anchors(5)
  7. Integrating Html And Css Part 1(5)
  8. Fast Template Design In Joomla Cms(2)
  9. Document Type Declarations(0)
  10. Simple Scripts In Html And Javascript(7)
  11. How To Make A Simple File Based Shoutbox Using Php And Html(8)
  12. How To Play The Guitar And Basics For Any Instrument(0)
  13. Do You Want To Use Php Code In Your Html Pages?(9)
  14. Spice Up Your Forms(11)
  15. Html Legend(9)
  1. Create A Simple Html Editor With Php And Javascript(3)
  2. Php Variable Basics(9)
  3. Css Basics(6)
  4. Creating Navigation For Html Websites(12)
  5. Css Basics No.2(0)
  6. Fruity Loops Tutorials-trance Style Songs(5)
  7. Fruity Loops Tutorials-arpiggeator(0)
  8. Html Bdo...(13)
  9. Html Span(7)
  10. Cakephp On Ubuntu(0)
  11. [php] Clean Code Functions(5)
  12. How To: Html Tables.(8)
  13. Add Flashing Inbox To Invisionfree Forum(0)


 



- Lo-Fi Version Time is now: 25th July 2008 - 12:32 PM