W3Schools Online Web Tutorials

Tech

Tech

html coding program?

do u really need some kind of html program to use html coding? I got the script on a notepad file.

EDIT: I'm just starting to learn about it and I used this website, http://www.w3schools.com.

Btw do you need a program for Javascript?

October 27, 2010

11 Comments • Newest first

Cawickeng

ok I'll get Notepad++. It can be used for all types of programming like Javascript and C++ rite?

EDIT: btw do I need to just dl the installer exe. file for notepad++?

Reply October 30, 2010 - edited
walridge3

[quote=KayFour]Bad PHP can be 'hacked' by PHP. JS depends on what you want to do with it.
I don't know anything about doctype, but that it what I use and hasn't failed me.
I would only use span to style text or something.

include ($_GET['page'].'.php');

hackable? yes.[/quote]

Apparently that's "based on user input" though, cause I do agree that you can use PHP to exploit sites were you a malicious user: http://www.php.net/manual/en/function.include.php#100553 .

Reply October 29, 2010 - edited
walridge3

[quote=Cawickeng]ok I see. Btw what's the point of syntax highlighting? and what's DTD?[/quote]

Syntax highlighting simply makes it easier to see HTML keywords or special values by coloring or bolding them. Like others have said, try Notepad++ and check around the menus for HTML highlighting. As for what DTD is... well, [url=http://www.w3.org/QA/Tips/Doctype]I'll let this QA page explain it.[/url]

Reply October 29, 2010 - edited
Cawickeng

ok I see. Btw what's the point of syntax highlighting? and what's DTD?

Reply October 29, 2010 - edited
walridge3

Your code's all html currently, and has plenty of errors besides the styling issues already pointed out.

[url=http://pastebin.com/WFRXwUyW]Here is an amended version that isn't completely better, but at least one step towards it.[/url]
A couple of things:
1) As mentioned, your DOCTYPE isn't right (looks like you tried to combine your DOCTYPE and the HTML tag)
2) Styling issue, but please indent properly: I'm sure you did this in Notepad so it didn't have tabs, but as mentioned get Notepad++ and that'll work fine. You can even enable Syntax Highlighting like I did on Pastebin.
3) Your first link (href) has an improper url. Also, enclose href urls in quotes.
4) Hrefs always have a link text, just as Basil does with links. Those go between the opening and closing anchor tags, and the url itself goes within the opening tag.
5) Closing tags (aka line 15) always have a forward slash before the tag name.

Relevant W3 pages: http://www.w3schools.com/tags/tag_doctype.asp and http://www.w3schools.com/HTML/html_links.asp

Reply October 28, 2010 - edited
Cawickeng

oh ok thanks I'll try that.

Reply October 28, 2010 - edited
Cawickeng

ok ok. I just came back now and looked at all your comments. I'm using that http://www.w3schools.com/ website and I'm just starting to learn to do paragraphs though. So it's very elementary. I just got really interested when my friend showed me how he sorta hacked into the school's server and into our printing accounts using HTML.

No I'm in Australia.

So yeah my code is only about 5 lines lol. A header and like a few paragraphs.

Here it is lol.

http://pastebin.com/7jKVNb41

Reply October 28, 2010 - edited
walridge3

Paste your code in http://pastebin.com and link it back here, I could take a look at it.

Edit: To clarify, make sure that to run the JavaScript from your browser you either add it as an import to a HTML file, or put the script in a <script type:"text/javascript"> </script> tag within the HTML file : for more info read here http://www.w3.org/TR/REC-html40/interact/scripts.html

Reply October 27, 2010 - edited
Cawickeng

Ok I see. But how do I run the script when I open the file? Cos I just see the script in the file.

Reply October 27, 2010 - edited
walridge3

Eclipse is unnecessarily heavy for just HTML or JavaScript; I personally have only used it for Java programming so far. I would use Notepad++ : it's light, similar to Notepad but has syntax highlighting among many other useful features. Also, JavaScript does not need any kind of program, you just write it up as with HTML and the script is run by your browser (whichever one you use) when you open the file.

Reply October 27, 2010 - edited
Cawickeng

ok thanks. Is that the same for Java script?

EDIT: I just checked Eclipse and I only found downloads for C++ and Javascript.

Reply October 27, 2010 - edited