SyntaxLAMP.com
Home :: Forum Index :: FAQ :: Search :: Memberlist :: Usergroups :: Chat
Register :: Log in :: Profile


HTML In Easy Steps: Part 2

 
Post new topic   Reply to topic    SyntaxLAMP Forum Index // HTML/CSS/Javascript
View previous topic :: View next topic  
Author Message
Rhett
Administrator
<font color='#E65E02'><b>Administrator</b></font>


Joined: 13 Dec 2006
Posts: 9468
Location: 3D Space

PostPosted: Tue Feb 09, 2010 3:39 pm    Post subject: HTML In Easy Steps: Part 2 Reply with quote
Welcome to the second session of HTML In Easy Steps. I'm Rhett, your lovely host! Let's get started.



How the browser interprets
The web browser interprets HTML the same way that most program compiling engines do: parsing. Parsing is basically sifting through the code in a specific order making sense of everything. To do this, the browser (program/parser) "reads" through the code like a human would. They read left to right and down when at the end of a line. The order in which the program parses the page and permits events to occur, is sometimes referred to as computer or programming logic. HTML is less complicated than most programming languages due to the fact that HTML codes always follow in the order of left to right and do not have confusing if then statements or loops.

So, basically, HTML is parsed as it appears. Knowing this makes understanding HTML logic a little easier. Rest assured, HTML is so simple I do not personally consider it a programming language. I consider it a script or format.



HTML Basics
Basically (excuse the pun), HTML is comprised of three parts. These parts are much like that of a standard personal letter. There is a header, body (content), and closing. In HTML, the parts are html, head, and body. The "html" is the whole HTML document itself. The "head" contains basic information such as the site's title. The body is where all of the content is displayed. The body is what is workable in real-time with the browser. You can think of the header as the settings, and the body as the physical, real output.



HTML Tags
Everything in HTML is comprised of tags. These tags are what make HTML so easy to understand and use. A tag is represented by the less than and greater than signs: < and >. Typically, the last sign as a / before it. So a tag could look like < /> or in some cases < >< /> Which, we'll get into later.

The tag is what separates text and content from settings and formatting. For example, to add bold to a piece of text, you would use a piece of code such as this:
This text is not bold. <b>This text is now bold</b>

The text within the <b> and </b> is bolded. The <b> tag is obviously for bold. Whatever is between the <b> and </b> tags will be displayed in bold. Some exceptions apply to this. Images will not be displayed in bold, and links or hyperlinks have to be set to bold in a slightly different way. Again, this will be covered later.



The Basic HTML Format
HTML is formatted in a very simple manner. To create an HTML page, you have to have the html, header, and body components, as mentioned. These components are used in HTML as tags, as is practically everything in HTML. Here is a quick look at what the format will look like:

<html>
<head>
<title>The title of this page</title>
</head>
<body>
This is the content of the page.
<b>This text is bolded</b>
</body>
</html>


What you will notice in this example is that the slash or / ends the tag. The <html> tag is around the whole document and the <head> displays basic formatting options. The <body> contains text that the site's visitors would see.

This format is the absolute basic structure of a standard HTML document.








Conclusion
That concludes this session! I don't want to bog down what we've learned, as this needs to be easy! Hence the title "In Easy Steps". The next lesson will be getting started with using HTML, so this is a nice place to stop and reflect for now.
_________________

How to Upload an Image | Forum Rules
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Post new topic   Reply to topic    SyntaxLAMP Forum Index // HTML/CSS/Javascript All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
Site