|
|
|
|
![]() ![]() |
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!
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 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.
<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... |
|
|
|
Jan 4 2008, 03:31 AM
Post
#2
|
|
|
Ephesians 6:10-17 ![]() Group: [MODERATOR] Posts: 1,864 Joined: 22-June 05 From: The World of Gentoo Member No.: 8,528 ![]() |
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> |
|
|
|
Jan 4 2008, 11:24 AM
Post
#3
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,054 Joined: 28-May 05 From: Hertfordshire, England Member No.: 7,593 ![]() |
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. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 25th July 2008 - 12:32 PM |