HTML syntax is very simple. Before you start, I would suggest you grab yourself a text editor with syntax highlighting.
Basic Editor vs. WYSIWYG
Should I use a basic text editor or a WYSIWYG (What You See is What You Get) editor?
Basic editors give you:
- Full control over your content
- If you're an ok coder at the least, your designs will load much faster
- You will know exactly where everything is placed and what/where to edit, letting you have easier fixing and control
- You have to code the website by hand, and though it's easier than it looks, newcomers may reject the mere idea
WYSIWYG gives you:
- A visual view of your design
- Often it's easy to edit settings/properties/tags without guessing them/researching
- The code will load slow
- You will have a hard time controlling your design properly
- You will have worse control over the contents and capabilities you want to achieve
So the thing comes to this; I personally suggest a basic editor rather than a WYSIWYG editor. Pick one with syntax highlighting, since that will make your editing easier, and those usually come with comfortable settings and controls that let you code faster and more efficiently, rather than MS notepad for example.
I personally suggest
Notepad++, but if you fine one you prefer more -- by all means, go ahead. I will not be addressing the editor in particular at any parts in the tutorials unless I specifically say so, so whichever you pick does not matter.
If you still rather go with a WYSIWYG editor, most of the HTML taught here will not be much help -- actually, very little.
HTML syntax is very easy.
Every tag must be opened and closed -- except for a few which only have standalone tags.
A tag begins with < and closes with >. The closing matching tag usually begins with </ and ends with >. These tags are tags that have properties and can have content inside them which the tag only applies to the content itself, not anything outside it.
Tags that do not have closing matching tags, open with < and close with />. Those are tags that should not have a content inside them, only properties. For example, the <img /> tag and it's image source and alternative text. It should not have a content.
A comment is a line that does not get interpreted by the browser. What does that mean? It can be used to leave, as the name implies, comments for the reader of the code, whether it's the user or the developer.
Comments begin with <!-- and end with -->.
Here are examples of tags:[HTML]<!-- This is a comment. This will be ignored by the parser. -->
<!--
Comments can be multiline
And indented.
-->
<b>Bold text<!-- Comments can go anywhere except for inside a tag's property place. --></b>
<!-- This is an example of a normal tag that opens and closes. -->
<i>Italic text</i>
<!-- This is an example of a tag that does not have a closing matching tag.
This particular tag generates a horizontal line on the screen. -->
<hr />
[/HTML]
HTML properties are the things that define how the tag should behave and act.
For example; an image tag cannot be left blank, it should have a source image that tells it which file to take and display it!
Properties are announced like so: <tag
property="value">.
An image tag has a source property which tells it which image to show.[HTML]<img src="mypicture.png" />[/HTML]
This will make the picture called "mypicture.png" located in the same directory as the html page load.