basic HTML

Sabtu, 24 Desember 2011

The most important HTML tags are tags that defining headings, paragraphs and line breaks.

Like most other programming languages​​, then the best way to learning HTML is to a lot of practice. Exercise of course requires a tool. Well, basically you can make an HTML file using notepad, but of course a lot of software to write to many facilities that make it easy. Googling wrote or search at download.com with keywords HTML Editor.

Title
The title tag is defined by using <h1> to> h6>. <h1> letter defining the title of the largest, and smallest <h6>. For this exercise you try to make the following HTML file and note the results.

<h1> This title </ h1>
<h2> This Title</ h2>
<h3> This title </ h3>
<h4> This title </ h4>
<h5> This title </ h5>
<h6> This title </ h6>

HTML automatically adds an empty line before and after the title.

paragraph

Paragraphs are defined by using tags <p>.

<p> This is a paragraph </ p>
<p>This other paragraph </ p>

Just like title, HTML automatically adds an empty line before and after paragraphs.

Don't forget closing tag

You must have been Seeing that paragraphs can be written without the closing tag </ p> like this:


<p> This is a paragraph
<p> This is another paragraph
Just an example can be used on almost any browser, but it should not have relied. HTML versions in the future I think will not allow you to skip the closing tag.

Replace line

<br> Tag used when you want to create a new line, but have not wanted to change the paragraph. <br> Tag will create a new line for you wherever you put that tag.

Closing all HTML elements with closing tags is a powerful way to write HTML that is compatible with browsers semeua and future development. It also makes our code easier to understand (both read and in the browse).

<p> This is a pa <br> <br> ragaraf with line breaks </ p>

Tag is an empty tag. Well, that's why she did not have closing tags such as , because so not sense.


<br> or <br />


You'll more often see writing <br> tag this way: <br />

Since the tag has no closing tag <br>, then the tag is violating one of the basic rules of writing HTML in the future (XML-based XHTML), in which all elements must be closed.

Write a line with the way this <br/> ensure that your HTML file will be compatible with XML and how to write HTML in the future.

Write comments in HTML

Comment tag is used to insert a comment in HTML source code. A comments be ignored by browsers. You can use comments to explain the code that you make, and of course this will help you when you need to make changes to your code sometime.
<!- This is a comment ->

Note that you need to write an exclamation mark after the opening parenthesis, but not before the lid brackets.

Remember the following things!
  •      Each HTML tag has a name element (body, h1, p, br)
  •      Opening tag is the name surrounded by square brackets: <h1>
  •      Closing tag is a slash and the name surrounded by angle brackets </ h1>
  •      The element content is between the opening tag and closing tag
  •      Some HTML elements have no content element
  •      Some HTML elements have no end tag

Some Useful Tips


When you write HTML text, you can never be sure how the text is displayed by other browsers. Some people have a larger monitor, and others. Text will be reset every time a visitor resizes the window. Never try to membantuk text that has blank lines or spaces close to the text.

HTML will remove the spaces in your text. However much space you wrote, it will be calculated one. One more, in HTML a new line counts as one space.

Using empty paragraphs <p> to insert blank lines is a habit that is not good. Use the tag <br> as his successor. (but do not also use the tag <br> to make the list. Wait till ya started lessons on the list).

HTML automatically adds an empty line before and after some elements, such as before and after paragraphs and title.


Basic HTML tags

These are important tags that will very often you are wearing. And you will study each in more detail, especially concerning its attributes.


Tag - Description

<html> - Defines an HTML document

<body> - Defining the main content

<h1> to <h6> - Defines title 1 to 6

<p> - Defines a paragraph

<br> - Insert a row

<hr> - Defines the horizontal line

<!--> - Make a comment

Cool right? This is not how, wait until you already can make tables, font color and appearance of many more variations that can be used to enhance your web pages.

0 komentar:

Posting Komentar

 
© Copyright 2010-2011 web design Web Design.
learning HTML Learning PHP | Published by create PHP | Sport News Blogger.com.