Sunday, October 26, 2014

Basic Syntax and Document Stucture of HTML

I will share about basic syntax and document structure of HTML. You have to know about this post before you make a HTML document. i hope you will get my point. Happy reading ^^ ...

Basic Syntax:

- HTML elements are defined using HTML tags.
- HTML tags are surrounded by the two characters < and > , called angle brackets.
- HTML tags normally come in pairs like <i> and </i>.
- The first tag in a pair is the start tag, the second tag is the end tag.
- The text between the start and end tags is the element content.
- HTML tags are not case sensitive, <i> means the same as <I>.
- This is an HTML element. example <i> This text is italic</i>.
- Tags can have attributes : 

  1. Attributes can provide additional information about the HTML elements on your page, 
  2. Example, <body bgcolor="pink"> 
  3. Attributes always come in name/values pairs like this: name="value"  
  4. Quotes style "pink" or 'pink'
- Comment form <!--............-->
- Browsers ignore comments unrecognizable tags,line breaks, multiple spaces, and tabs 


HTML DOCUMENT STRUCTURE
<html>
<head>
<title> Title of page </title>
</head>
<body> This is my first homepage <i> This text is italic</i></body>
</html>
  1. The whole document must have <html> as its root.
  2. A document consists of a head and a body of frameset.
  3. The <title> tag is used to give the document a title which is normally displayed in the browser's window title bar (at the top of the display).

Saturday, October 25, 2014

What is HTML?

What is HTML? okay in this post, I will share about HTML. Happy reading ^^..
HTML stands fof Hyper Text Markup Language. An HTML file is a text file containing small markup tags. The markup tags tell the Web browser how to display the page. An HTML file must have an ‘htm’ or ‘html’ file extension. HTML documents are described by HTML tags.  Each HTML Tags describes different document content. 

HTML can be edited by using a professional HTML editor like:
- Adobe Dreamweaver
- Microsoft Expression Web
- CoffeeCup HTML Editor

HTML Example, i will give you smal HTML document. Let's try and don't forget you must have an 'htm' or 'html' file extension

<!DOCTYPE HTML>
<html>
<body>
<h1>My First Heading. </h1>
<h2>My Second Heading </h2>
<p>This is My first paragraph ^^</p>
</body>
</html>

Output:
example small html document, contoh html
SMALL HTML
Example explained from codes above : 
    - The DOCTYPE declaration defines the document type.
    - The text between <html> and </html> describes the web document.
    - The text between <body> and </body> describes the visible page content.
    - The text between <h1> and </h1> describes a heading (first heading).
    - The text between <h2> and </h2> describes a heading (second heading).
    - The text between <p> and </p> describes paragraph.

      Follow 4 steps below to make output above:
      Step 1 : Open Notepad
      To open Notepad in Windows 7 or earlier: Click Start (bottom left on your screen). Click All Programs. Click Accessories. Click Notepad.
      To open Notepad in Windows 8 or later: Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad. 

      Step 2 : Write Some HTML
      Write or copy codes above 

      Step 3 : Save the file on your computer
      Select File-->Save as in the notepad menu
      When saving an HTML file, use either .htm or .html file extension 

      Step 4 : View HTML page in your browser
      Double-click your saved html file, and the result will look like picture above

      Thanks for visiting this post ...^^