May 25, 2012, 06:37:40 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Prowlie Welcome back! The site migration is complete and normal service resumed.
Advanced search
Pages: [1]   Go Down
Print
Author Topic: Simple HTML Page  (Read 1233 times)
0 Members and 3 Guests are viewing this topic.
Abstr
Woodfolk
*
Offline Offline

Posts: 5


« on: September 24, 2008, 10:55:58 AM »

 I have created this tutorial to give you a better understanding of HTML.

But, First A Little Introduction.
HTML stands for Hyper Text Markup Langauge. This language is used to create webpages, both basic and professional.

To begin Simple Copy and Paste this code into your favorite Text-Editor (i.e Notepad)

Code:
<html>
<head>
<title>My First Webpage!</title>
</head>
<body>
This is my very first homepage!
</body>
</html>

There you have it, your very first homepage. Now to test it out simply Go to File >> Save As. Save it as myfirstwebpage.html NOTE*The .html is very important at the end. If you do not save it as .html then it will not work. Save it to your desktop or other place you will remember it. Now simply open it up.

If you have any questions feel free to ask! Wink
Logged
Emerald_Fang
Woodfolk
*
Offline Offline

Posts: 9


« Reply #1 on: April 08, 2011, 02:53:44 AM »

I was actually going to start my own topic about this. I think it would be great to actually have programming tutorials available here.

Alright I'll add to this.

The code you'll see in HTML is designed around the idea of tags. You have elements like p, h(1-6), table, and various others (I'll post a better list some day). These elements have attributes such as, bold text, italicized text, text alignment, position on the web page, ect ect.

Simply put, elements are the visual you see on the web page itself. They're objects found within the Body portion of your HTML file. Now, the important thing is how to change attributes of an item.

For example
Code:
<html>
<head>
#Intro {text-align: center; font-size: 42; border: solid; border-width: 2em}
<title>My First Webpage!</title>
</head>
<body>
<p id="Intro">This is my very first homepage!<p>
</body>
</html>

Now I've modified the previous post by assigning the text of the HTML document as a paragraph element. You can then set the paragraph element's ID as whatever you want within the id="Whatever ID You Want To Call This Element". Now, also notic that I've added the #Intro selector. This selector tells your HTML document that anything with the ID of Intro should be formated as specified. There are ton of coding websites available that have a list of different attributes you can change with styles.

Also to manually change a style without defining a selector (say for one word, or a heading) you can directly code into the element.
Example
Code:
<h1 style="font-size: 50; color: red">This is my heading!</h1>

NOW HERE COMES A HUGE MISTAKE TO FIRST TIME HTML DESIGNERS!!!!!
You must remember, HTML is a tag based system, you MUST open and close all elements properly and in order.

Incorrect Example
Code:
<html>
<head>
#Intro {text-align: center; font-size: 42; border: solid; border-width: 2em}
<title>My First Webpage!</title>
</head>
<body>
<p id="Intro">This is my <span style="color:blue">very first homepage!<p></span>
</body>
</html>

This is incorrect because the span element is opened within the paragraph element, but is closed outside of the paragraph. With some elements you might be able to create your desired result, but most of the time this will lead to errors and runtime errors on different browsers.

The correct coding is
Code:
<html>
<head>
#Intro {text-align: center; font-size: 42; border: solid; border-width: 2em}
<title>My First Webpage!</title>
</head>
<body>
<p id="Intro">This is my <span style="color:blue">very first homepage!</span><p>
</body>
</html>


This tells you that the word, very first homepage, should appear in blue. But now comes a problem, precedence. In designing a site you must be aware of the hierarchy of styles. This will be my next post, because it is important to realize on when and where your styles will be applied. In the next post I will also touch more on CSS and how a style sheet can be useful on projects.
Logged
Brackenwood
   

 Logged
Pages: [1]   Go Up
Print
Jump to:  

Theme by Pieter, based on Black Rain by Crip Powered by SMF 1.1.16 | SMF © 2011, Simple Machines XHTML | CSS

Page created in 0.055 seconds with 24 queries.