Jump to content
Killersites Forums

The most noob question you will ever read on HTML


steamtronic
 Share

Recommended Posts

Please be gentle. Please be gentle. Please be gentle.

 

<deep breath>

 

Ok, I'm brand new to web design. Ive been through the w3schools site and am pouring over my "Building Websites for Dummies" Books (both the Sahlin/Snell all-in-one second edition AND the Crowther versions) but cannot seem to find an answer to this most basic of problems:

 

When coding HTML, what program do I write it in, and what file format (ie extention) do I save it in? :huh:

 

Ive written some very basic intro stuff in MSWord and Wordpad (Windows VISTA 32) , then saved in .HTM, .HTML, .RTF, and .TXT formats - yet I get the same problem - when I open them in any browser (IE9, Chrome 17, Firefox 3 or Opera 11) the document appears exactly as written - HTML tags & all. When I view the source there appears to be a huge amount of extra HTML code automatically added.

 

What am I doing wrong? What should I be doing? Please help!

Link to comment
Share on other sites

First and very importantly, DON'T save from a Word file as Word carries over unwanted formatting to some characters like " and ' . Use Notepad for writing code or Notepad++ or special text editing program or save from Word into Notepad first which should destroy the unwanted hidden formatting. Wordpad is another alternative, but I use Notepad and that's OK.

 

Save your files with .html or .htm extension (.html is more common than .htm) or save with .php extension if you have PHP code on the page that will need server processing (unlikely if you are a beginner).

 

Make sure when you save your files that you Save As: Type: All Files (*.*), not Text Documents (*.txt), and also use Encoding ANSI. Then check in your file list eg Windows Explorer that the file has been saved as myfile.html and not myfile.html.txt as sometimes the .txt gets added automatically and you don't want that.

 

Use index.html for your home page as when a user just types in www.your-domain-name.com the server will automatically look for a file called index.html (or index.htm or index.php).

 

When you want to look at a file called index.html or myfile.html on your browser, just double click the filename in the list and it should open up in the browser after processing the html code. If you want to edit the file in Notepad, use right click Open with Notepad.

 

If you have progressed to stylesheets, these files should be written in Notepad (or another special text editor) and saved with .css extension (like my-style.css) and a link given in the head section of every html page like:-

<link rel="stylesheet" href="my-style.css" media="all" type="text/css">

Edited by Wickham
Link to comment
Share on other sites

If the html file opens in IE, Chrome or Firefox it should open in Opera. Try right click.. Open With.. Opera

 

Working! Thank you! :D

 

OK so my first lesson was "Dont write up webpages in MSWord". It's interesting that I haven't come across this advice in any of the noobie literature I've got my hands on so far.

 

Anyhoo, thanks again Wickham.

Link to comment
Share on other sites

Save your files with .html or .htm extension (.html is more common than .htm) or save with .php extension if you have PHP code on the page that will need server processing (unlikely if you are a beginner).

 

I am well aware that M$ Word adds a lot of junk which makes it un-usable for coding purposes, but...

 

What's wrong with saving as .txt? I have used notepad++ for years, saving all my projects as .txt and never had an issue.

Am I missing something obvious by saving all my files as .txt? :\

Link to comment
Share on other sites

  • 5 months later...

Notepad will get you through the night, but an Integrated Development Environment (IDE) will be your tool of choice as you progress.

 

An IDE is just a really-fancy Notepad, with nice colors and 'indent-helping' and such for your code.

 

Adobe Dreamweaver is a good one.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...