jeudi 8 décembre 2011
HTML: terms and syntax (a tutorial for beginners)
Do you like this story?
At the end of October I published a post about CSS terminology which explained the basic usage of Cascading Style Sheets and technical terms used to identify and explain code parts.
Today we are going to do the same for HTML, because I feel that sometimes terms are not properly used, and we surely need to make things clear.
The following will be a short and undoubtedly not complete journey through the basic HTML programming. If you are a little bit experienced, you might find it boring... however, are we fully sure we use the correct terminology?
Follow me and see for yourself.
HTMLHTML stands for HyperText Markup Language and it is the programming language used to build web pages. The first version of HTML was defined in 1991. Today we often talk, write and discuss HTML latest version: HTML5.
The programming language is quite intuitive and it mainly consists of tags.
<p>Welcome to The Web Thought</p>
<p> is the start tag;Welcome to the Web Thought is the content;
</p> is the end tag (made of a slash "/" and the tag name again);
<p>Welcome to The Web Thought</p> is an element.
There are HTML elements that do not have a start tag and an end tag. Those elements consists in only one tag (for example the <br> element).
<tagname attribute="value">content</tagname>
Now, something you might not know: quotes around values are not always needed, infact if the value has no space or any special characters like " ' ` = < and >, we can remove the quotes.Another thing: we can use double quotes or single quotes, it doesn't matter.
- doctype
- html
- head
- body
<!doctype html>
<html>
<head>
head content
</head
<body>
body content
</body>
</html>
The head content is different from the body content. The body content is where we want to insert our page elements, while in the head we are going to insert the document metadata.We shouldn't overlook the importance of the head element. First of all, it is to be noted that the document metadata will not be shown on the page (while the body content is). Secondly, in the head is where we insert references to JavaScript libraries such as jQuery, references to external stylesheets, we embed stylesheets and document related metadata such as title, keywords and so on.
An example:
<div>
<font color="#000000">Welcome to The Web Thought </font>
</div>
The above code represents a good way of creating a document structure. Or, being more strict:<div>
<font color="#000000">
Welcome to The Web Thought
</font>
</div>
Remember that the more accurate is the coding process in terms of clarity, the easier it will be to understand and maintain the code itself. Ok folks!, I think that's enough for today. I believe you've been bored enough.
Have a nice day and share your thoughts as usual!

This post was written by: Franklin Manuel
Franklin Manuel is a professional blogger, web designer and front end web developer. Follow him on Twitter
0 Responses to “HTML: terms and syntax (a tutorial for beginners)”
Enregistrer un commentaire