Wednesday, February 11, 2009

What is an HTML File? - Joannacel A. Paraiso

HTML

What is an HTML File?
  • HTML stands for 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
  • An HTML file can be created using a simple text editor.

HTM or HTML Extension?
  • When you save an HTML file, you can use either the .htm or the .html extension. We have used .htm in our examples. It might be a bad habit inherited from the past when some of the commonly used software only allowed three letters extensions.

HTML Elements:
  • HTML documents are text files made up of HTML elements.
  • HTML elements are defined using HTML tags.

HTML Tags
  • HTML tags are used to mark-up HTML elements
  • HTML tags are surrounded by the two characters and
  • The surroundings characters are called angle brackets
  • HTML tags normally come in pairs like b and b
  • 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, b means the same as B

Why do we Use Lowercase Tags ?
  • HTML tags are not case sensitive:B means the same as b.
  • When you surf the Web, you will notice that most tutorials use uppercase HTML tags in their examples.
  • Why we always use lowercase tags?
  • If you want to prepare yourself for the next generations of HTML, you should start using lowercase tags.
  • The World Wide Web Consortium(W3C) recommends lowercase tags in their HTML 4 recommendation, and XHTML (the next generation HTML) demands lowercase tags.

Tag Attributes
  • Tag attributes can provide additional information about the HTML elements in your page.
  • This tag defines the body of your HTML page:body.With an added bgcolor attribute, you can tell the browser that the background color of your page should be red, like this: body bgcolor “red”.
  • This tag defines an HTML table:table. With an added border attribute, you can tell the browser that the table should have no borders:
  • Attributes always come in name/value pairs like this: name “value”.
  • Attributes are always added to the start tag of an HTML element.
  • Attributes values should always be enclosed in quotes.

    • Basic HTML Tags
      • The most important tags in HTML are tags that define headings, paragraphs and line breaks.

      Comments in HTML
      • The comment tag is used to insert a comment in the HTML source code. A comment will be ignored by the browser.
      • You can use comments to explain your code, which can help you when you edit the source code at a later date.
      • Note that you need an exclamation point after the opening bracket, but not before the closing bracket.


    No comments: