{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Introduction to HTML - 2.1 Introduction to HTML HTML is...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
2.1 Introduction to HTML HTML is defined using the Standard Generalized Markup Language (SGML) which is an ISO standard notation for describing text formatting languages. The Original version of HTML was designed in conjunction with the structure of the web and the first browser. It was designed to specify document structure at a higher and more abstract level. It also defines details of text such as font style, size and color. The use of web became more popular when the first browser MOSAIC was developed and marketed by Netscape. The next browser was Internet explorer by Microsoft. 2.1.1 History of HTML HTML was the standard developed by Microsoft for web technologies. First HTML standard was HTML 2.0 was released in 1995. Next HTML standard was HTML 3.2 was released in 1997. The latest version of HTML standard is HTML 4.01 was released and approved by W3C in 1999. The XHTML1.0 standard was approved in early 2000 which is a redefinition of HTML 4.01 using XML IE7 and FIREFOX2 (FX2) support XHTML 1.1 2.1.2 HTML versus XHTML HTML is easier to write whereas XHTML requires a level of discipline. HTML has more number documents available on the web hence most of the browsers still prefer supporting HTML. XHTML is preferred for its quality and consistency in any endeavor. HTML lacks these features as it has few syntactic rules and high degree of freedom to create documents. XHTML has strict rules to document and we can check the syntactic correctness through XML browser and validation tools. XHTML editors are also available to create documents. 2.2 Basic syntax 2.2.2 HTML TAGS The fundamental syntactic units of HTML are called tags . They specify the categories of the contents. For each category the browser has default presentation specifications for the specified contents. The syntax of the tag is a tag’s name surrounded by angle brackets (<>) Tag names must be written in lower case letters and in pairs of opening and closing. A browser display of an XHTML document shows the content of all of the documents tags; it is the information the document is meant to portray. Not all tags can have content.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2.2.3 Basic syntax E.g.: if <p> is opening tag then corresponding closing tag is <\p> and what appears between them is the content of the tags. Comments in programs increase the readability of those programs. In XHTML they appear as <!-- -->. Browser ignores the comments, unrecognized tags, multiple spaces and tabs, line breaks etc. The tags are like suggestions to the browser. Any error in the document is ignored by the browser like a misspelled tag. Para tag <?xml version ="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <p> HI!!!!this is good</p> </html> HI!!!!this is good 2.3 Standard XHTML document structure Each document must begin with an xml declaration element (which is the first line of XHTML document and begins in the first character position) that identifies the document as one based in XML. Version number is specified. Second attribute encoding specifies the encoding used for the document which here is Unicode utf-8.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}