Nov 22, 2009
Pages: 1, 2

Html Basic Tutorial - <!-- For beginners only -->

free web hosting

Read Latest Entries..: (Post #12) by HannahI on Nov 3 2009, 09:55 PM.
I'm not a begginer, but that is a nice tutorial.Anyways Karmen, post me a link, I like looking at websites.
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion & Free Web Hosting > Computers & Tech > How-To's and Tutorials > Programming > HTML, XML and other Markup Languages

Html Basic Tutorial - <!-- For beginners only -->

Propeng
Knowledge
HTML stands for Hyper Text Markup Language.
You cannot create an HTML file using a rich-text editor, such as Microsoft Word or Wordpad.

HTML
To write a basic HTML, you will need to start with this:
CODE
<html>

The <html> tag tells the browser that this is an HTML page.

To close any tag, the same tag will be repeted but with the "/" sign. For example,
CODE
<html>
  <head>
    <title>Page title</title>
  </head>
</html>

Did you notice the </title>, </head> & </html> tags? That's how we close the tag.

The <HEAD> Tag

A <head> tag will include the <meta>, <title> and any other scripts that will NOT be viewed.

First, we will write a <title> that tells the browser that "Example" (Inside the <HTML> & the <HEAD> tags):
CODE
<title>Example</title>

Without the / tag, the script will NOT work!

Then we will write the <meta>s:
CODE
<meta name="description" content="This is an example HTML script." />
<meta name="keywords" content="example html tutorial learn" />
<meta name="Other verification content, " content="such as Google Webmaster Tools verification meta.">

The "description" meta is the description that will apear if your website is indexed by search engines.
The "keywords" meta will be the keywords that if any one search for "learn html", your website will apear because the desc. meta contains on of the requested keywords.
The <meta> tag will execute only if you put a "/" in before closing it. For example:
<meta /> NOT <meta>.

This page's result:
CODE
<html>
  <head>
    <title>Example</title>
    <meta name="description" content="This is an example HTML script." />
    <meta name="keywords" content="example html tutorial learn" />
    <meta name="Other verification content, " content="such as Google Webmaster Tools verification meta." />
  </head>
<html>


BODY
This page is still blank, because we haven't created the <body> tag.
This tag is the basic tag, which contains all the contents that will apear on your page.

To create a simple page with the title "Example" & the contents "This is a test page.":
CODE
<html>
  <head>
    <title>Example</title>
  </head>
  <body>
    This is a test page.
  </body>
<html>


Basic text formatting
<b> Bold,
<u> Underlined & finally...
<i> Italic text

These 3 tags are the most used, but not the all tags. To create a simple paragraph:
CODE
<p>This is a sample paragraph.</p>

To continue learning the HTML tags, scroll down.

Using javascripts in HTML
To use javascripts in an HTML file, use the following:
CODE
&lt;script type="text/javascript">document.write('Script Cotents');</script>


To use an external .js file:
CODE
&lt;script type="text/javascript" src="myjsfile.js"></script>


More HTML Tags
__
QUOTE
To continue learning the HTML tags, scroll down.
__

Using the <div align=""></div>
CODE
<div align="center"> Centered Text </div>
<div align="left"> Left-Aligned Text </div>
<div align="right"> Right-Aligned Text </div>


To create an image:
CODE
<img src="http://mydomain.com/myimgfile.jpg" alt="Alternate text." />

The src is the image location.
alt is the alternate text.
If you have created a stylesheet, you can add class="Class name.".
______________________________________
|That's all i have, but the post can be updated!|
-------------------------------------------------------

Next post:
How to create an SSL.
More HTML tags.
The <?php ?> tag.
AJAX.
Using the <noscript> & the <noframes> tags.

___________________________________

 

 

 


Comment/Reply (w/o sign-up)

Arbitrary
QUOTE

The <?php ?> tag.
AJAX.
Using the <noscript> & the <noframes> tags.
None of these have much relationship with basic HTML though. ;-) I'd suggest you add more information on other basic HTML tags rather than taking about server-side languages and javascript. Those could (and should) be covered in a wholly different tutorial.

QUOTE

The <meta> tag will execute only if you put a "/" in before closing it. For example:
<meta /> NOT <meta>.
Actually, no, this is not true. For HTML, you don't have to close every tag the way you just did to the meta tag. You can write it like this <meta ... > and it will still work. In XHTML, you're expected to close every tag (i.e., <meta .. /> and not <meta ... >), but even then, browsers will usually still display it. It's not proper semantics in XHTML but it's fine in HTML, so it depends on what your doctype says. I believe browsers display it either way.

QUOTE
<html>
<head>
<title>Example</title>
</head>
<body>
This is a test page.
</body>
<html>
There's a slight error in this code of yours. The ending tag ought to be </html> and not just <html>. ;-)

QUOTE

You cannot create an HTML file using a rich-text editor, such as Microsoft Word or Wordpad.
Technically you can--just resave it as an html file and then load it into your browser. Most of the basic things on the page (i.e., tables, paragraphs) will be loaded, but (1) the html file won't be standards compliant (it wasn't made for the web after all) and (2) it might not render the same way on all browsers. Just sayin'. ;-)

 

 

 


Comment/Reply (w/o sign-up)

Karmen
hmm this is what i came up with

<html>
<head>
<title>My Name Is Karmen</title>
</head>

<body>
</center><h1>This Is My Webpage</h1>
<br>Hi!</center>
</body>
</html>


I tryed doing the center thingy but it didnt work. how come?

Comment/Reply (w/o sign-up)

toby
Karmen, you used </center> and </center>, it should be <center> and </center> or <style> body { text-align: center; } </style>

Comment/Reply (w/o sign-up)

Karmen
so if i was to do something like

<html>
<head>
<title>My Name Is Karmen</title>
</head>

<body>
<center><h1>This Is My Webpage</h1>
<br>Hi!</center>
</body>
</html>

then that would center the writing? also how do i change the color of the background and text?

Comment/Reply (w/o sign-up)

wutske
QUOTE(Karmen @ Dec 14 2007, 12:39 AM) *
so if i was to do something like

<html>
<head>
<title>My Name Is Karmen</title>
</head>

<body>
<center><h1>This Is My Webpage</h1>
<br>Hi!</center>
</body>
</html>

then that would center the writing? also how do i change the color of the background and text?


That would indeed center all your text. I would usualy not use the center tags, but there good for starters smile.gif . If you want to set the background and textcolor, you'll have to add some information to the body tag:
CODE
<html>
<head>
<title>My Name Is Karmen</title>
</head>

<body style="color: #898989; background-color: #AFAFAF;">
<center>
<h1>This Is My Webpage</h1>
Hi!
</center>
</body>



The #898989 is a hexadecimal code that represents a color. The first 2 numbers are for red, the next 2 for green and the last 2 for blue. The larger the numbers, the more a color is represented.
A few colors:
White: #FFFFFF
Red: #FF0000
Green: #00FF00
Blue: #0000FF
Purple: #FF00FF
Grey: #999999

If you don't understand the hexadecimal code, you could use names instead, but your limited to a certain amount of color:http://en.wikipedia.org/wiki/HTML_color_names

Comment/Reply (w/o sign-up)

Karmen
wow thanks for all your help, with this tutorial ive started to join my photoshop together and make my first website! once its done ill give you guys the link here so you can tell me if i've done anything wrong.

thanks everyone who has helped me, and i just wana say if you need any help with c++ feel free to PM me.

Comment/Reply (w/o sign-up)

wutske
Hey Karmen, there's an online tool that can check if you did something wrong:
You enter the link to your site on http://validator.w3.org/ and press validate, it'll check if everything is written according to the standards wink.gif

Comment/Reply (w/o sign-up)

Karmen
QUOTE(wutske @ Dec 15 2007, 07:35 PM) *
Hey Karmen, there's an online tool that can check if you did something wrong:
You enter the link to your site on http://validator.w3.org/ and press validate, it'll check if everything is written according to the standards wink.gif


oh ok, thats quite usefull. so i just click on that and enter my website address and it will check it for errors?

edit: Just did that and i had like 60 errors smile.gif i googled most of them and figured out how to fix them. its quite helpful for new people and i would highly recommend using it.

Thanks for all your help wutske.

Comment/Reply (w/o sign-up)

ml01172
You guys realize that half of those attributes are obsolete in HTML? If you try w3 validator, it will tell you the same thing.

For an example, <... align="center">, <center>, <font color="...">...</font> etc. (everything related to exact "look" or "style" described in HTML) is obsolete and should NOT be used. CSS should be used instead.

HTML in general is used only to describe document structure, not the document appearance. So, instead of <center> you should use style="text-align: center", instead of <font> one should use style="color: red; font-family: sans-serif", instead of BOLD, ITALIC, UNDERLINE (<b>, <i>, <u>) corresponding CSS variants should be used.

Also, <em> should be used to define the given text as EMphasized, not only the style itself.

Comment/Reply (w/o sign-up)

Latest Entries

HannahI
I'm not a begginer, but that is a nice tutorial.
Anyways Karmen, post me a link, I like looking at websites.

Comment/Reply (w/o sign-up)

yordan
QUOTE (ryantommo @ Dec 17 2008, 05:00 PM) *
ty alot man

Please read the forum rules. We want you to write down correctly balanced English sentences, without sms-like shortcuts. One-line posts are also considered as spam and will be deleted.
Remember that your posts are reviewed, so if you want to be hosted here you should change your way of expressing yourself.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2
Similar Topics

Keywords : html, basic, tutorial, beginners,

  1. Basic Html Tutorial
    Made it myself, hope you like it. (1)
  2. HTML Tags
    Ever wondered what a HTML tag was (4)
    Many people that i have met have mentioned HTML to me without really knowing what it really means.
    Because of this i thought that maybe it would be a good idea to compile a tutorial for everyone to
    read. When i listen to people talking about HTML; they never seemed to know what a HTML tag was so
    that is what i will focus on here. ------------------- Some people who use HTML may notice that I
    place the tags below in the order they appear in a document. Most people who use HTML know the tags
    which no HTML document can do without. Those are: = this is the tag which ev....
  3. Quick Html!
    Three of the coolest scripts! (3)
    Table of contents: -Meta -Cursor -Icon -Animated Title Bar (Must see!) META Meta tags is
    one of the most important things you need to know about programming. It truly will help you is more
    ways then you can imagine. First off you may be wondering what a meta tag is. A meta tag is a simple
    few lines of code that you put in the header of your document to describe it. If you do this
    correctly you can get search engines (including Google) to add your website. There are a few things
    you want to keep in mind when your making your meta tags. Make sure that you stay on ....
  4. HTML 102 - Web Design For Beginners
    More Basic HTML Writing (6)
    HTML 102 - Web Design For Beginners More Basic HTML Writing This will be part two of a
    multi-part HTML tutorial. Please don't post advanced HTML replies to this article. This
    tutorial is specifically written for beginning HTML writers. Requirements:     Software: Web
    Browser, HTML Editor.     Knowledge: HTML 101 - Web Design For Beginners.     Skills: Ability to
    press the keys on the keyboard. So you have read and understood HTML 101 - Web Design For
    Beginners and you want to learn more. So far we have talked about a very basic web page. Black
    on wh....
  5. Good Comments Make Good Html.
    Commenting makes HTML easier to write. (15)
    Good Comments Make Good HTML. Commenting makes HTML easier to write. This is a spin off
    from another article I wrote entitle Good Comments Make Good Scripts. While the code is
    different, the concepts for comment are the same. Enjoy! Disclaimer! This tutorial is
    intended to be used to show the benefites of commenting your HTML in order to write clean, easy to
    read code. For the purpose of this tutorial, HTML, XML, XHTML validating is not taken into
    consideration. While I will make an effort to point out non-standardized code, validation has nev....
  6. HTML 101 - Web Design For Beginners
    Absolute Basic HTML Writing (7)
    HTML 101 - Web Design For Beginners Absolute Basic HTML Writing This will be part one of a
    multi-part HTML tutorial. Please don't post advanced HTML replies to this article. This
    tutorial is specifically written for beginning HTML writers. Requirements:     Software: Web
    Browser, HTML Editor.     Skills: Ability to press the keys on the keyboard. Any web browser will
    work as long as it can open files saved on your hard drive. -> Netscape and Internet Explorer are
    both free and easy to use. Any HTML editor will work as long as it is an HTML editor and not a....
  7. Converting HTML over to XHTML
    Crossing over to the darkside (13)
    Allow for alterations Well, I've just had to convert another HTML 4.01 Transitional website
    over to XHTML (eXtensible HyperText Markup Language) 1.0 Transitional, I will later on convert over
    to XHTML 1.0 Strict as soon as I write the CSS (cascading stylesheet) file for it but it had to be a
    quick update and removing all presentational elements and placing them in a CSS file is not quicker
    than just altering some tags. So this is where I got the idea to write a How to Convert HTML over
    to XHTML . Let's begin I'm having trouble knowing where to start ....

    1. Looking for html, basic, tutorial, beginners,

See Also,

*SIMILAR VIDEOS*
Searching Video's for html, basic, tutorial, beginners,
advertisement



Html Basic Tutorial - <!-- For beginners only -->

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com