Bog'liq KOMILOV ASRORIDDIN.docx LAB EXERCISE CSE315
KOMILOV ASRORIDDIN
ID:02021101N012
CSE315
LAB EXERCISE
Q1. HTML (Hypertext Markup Language) is the standard markup language used for creating web pages. XHTML (Extensible Hypertext Markup Language) is a stricter version of HTML that conforms to XML syntax rules. HTML5 is the latest version of HTML, which includes new features and improvements.The main differences between these three are:
1. Syntax: HTML uses a loose syntax, while XHTML has a stricter syntax that requires all tags to be properly closed and nested. HTML5 has a more flexible syntax that allows for optional closing tags and self-closing tags.
2. Doctype: HTML uses a doctype declaration that is not case-sensitive, while XHTML requires a strict doctype declaration that is case-sensitive. HTML5 also has a simplified doctype declaration.
3. Browser support: HTML is supported by all modern web browsers, while XHTML requires proper XML parsing and may not be supported by older browsers. HTML5 is supported by most modern browsers.
4. Media support: HTML and XHTML have limited support for multimedia content, while HTML5 includes new tags and attributes that allow for easy embedding of audio, video, and other multimedia content.
5. Accessibility: XHTML has better accessibility than HTML due to its strict syntax and use of semantic markup. HTML5 also includes new features that improve accessibility.
6. Mobile support: XHTML is preferred for mobile devices because it is more lightweight and can be parsed more easily. HTML5 includes features that improve mobile support, such as responsive design and geolocation.
Q2. The purpose of the declaration in HTML5 is to inform the web browser about the version of HTML being used and the character encoding being used in the document. This information is important for the browser to correctly interpret and display the content of the web page. The declaration also helps to ensure that the web page is displayed consistently across different browsers and devices.
Q3. HTML and XHTML are both markup languages used to create web pages, while HTML5 is the latest version of HTML. The main differences between these three declarations are:
1. Syntax: HTML uses a more lenient syntax, while XHTML uses a stricter syntax that requires all tags to be closed properly and all attributes to be quoted. HTML5 is a hybrid of both, allowing for some leniency in syntax but also requiring proper closing of tags.
2. DTD: HTML and XHTML use different Document Type Definitions (DTDs) to define the rules of the language. HTML5 uses a new type of DTD called the HTML5 doctype.
3. Elements: HTML and XHTML have a set of predefined elements, while HTML5 has introduced new elements such as , ,