Menu Close

Introduction to HTML and XHTML

What is HTML?

  1. HTML stands for Hyper Text Mark-up Language
  2. HTML is a standard Mark-up Language for creating Web pages.
  3. HTML describes the structure of a web page.
  4. HTML documents contain HTML tags and plain text
  5. HTML is mainly used for coding.

 What is XHTML?

            XHTML stands for Extensible Hypertext Mark up Language. It is a cross between HTML and XML Languages.

            XHTML is almost identical to HTML but it is stricter than HTML. XHTML is HTML defined as an XML application. It is supported by all major browsers.

Simple HTML Document are:

       Different Between HTML And XHTML

  1. HTML format is a document file format while XHTML format is a mark up language.
  2. All tags and attributes in HTML are not necessarily to be in lower or upper case while in XHMTL every tag and attribute should be in lower case.
  3. HTML was developed in 1991 by Tim Berners-Tee while XHTML was released in 2000 by W3C i.e World Wide Web Consortium
  4. In HTML, Doctype is not necessary to write at the top while in XHTML, Doctype is always necessary to write at the top of the file.
  5. HTML is less expressive while XHTML is more expressive as compare to HTML.

Basic Rules Guiding HTML Are:

1: Tags are always surrounded by angle bracket (less-than/greater-than character), as in<head>

2: The second tag-the “off switch”-always start with a forward slash example: </head>

3: Always indent your code to make it easier for the viewer to read.

4: The head part of the HTML dose not only consist of meta but it also consist title, links and style just in case you want to style  your page.

5: When you open a tag you must close it.

HTML Meta Tag and what they are used for

Definition and Usage of HTML TAGS

Firstly, meta tags are important because they impact how your site appears in the web browser and how many people will be inclined to click through to your website.

The <meta> tag defines metadata about an HTML document. Metadata is data (information) about data.

<meta> tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.

Attributes

Name: This attribute is used for indicating the character encoding for the HTML Document.

Http-equiv: This attribute is used to get the HTTP response message header.

Content: This attribute is used to specify properties value.

charset: This is used for indicating the character encoding for the HTML Document.

Explanation on Character Entity

HTML character entities are basically a set of character (entity) used to represent few characters reserved by the HTML, especially invisible characters or characters difficult to type out using a regular keyboard. HTML provides some entity names and entity numbers to use these symbols.

How to Validate Your HTML Codes Using W3consortium

W3C  Stands for the World wide Web consortium, a recognized global web standards body.  Tim Berners-Lee founded this organization and is run by a full-time staff to continue creating and preserving web standards.

The w3c validation: this looks at the XHTML doctype you are using for the document you give it to Check, and then check your markup accordingly. This one is Recommend if you are using an HTML4 or XHTML1.

Why Validate a Site on W3c?

1: Helps Improve Rankings in Search Engines.

2: Improved Website User Experience.

3: Make Website Browsers Friendly.

NOTE: we can validate our codes using HTML validator and CSS validator

HTML Validator: This valiadtor check the markup validity of web document in HTML, XHTML, SMIL, MathML, etc.

CSS Validator: This validator checks the CSS validity of web document in HTML, XHTML etc.

Leave a Reply

Your email address will not be published. Required fields are marked *