Structure of HTML web page
- HTML page at high level comprises of two sections.
o Document Declaration
o Document Scope
Document Declaration
- Every markup document starts with the document declaration.
- The document declaration comprises information about the document given to browsers parser [Translator].
- The information comprises of details like
o Culture of document
o Language of document
o Encoding of document
o Version of document etc.
- The document declaration is for parser not to display in the browser.
- HTML document declaration specifies the language and version.
- Document declaration in HTML is defined by using the following
<!DOCTYPE html>
W3C.org, WHATWG
Document Scope
- Every browser can display multiple documents merged into one body section.
- You can display multiple documents into one body.
- Every document scope is defined by using “<html>” element.
Syntax:
<html>
Document root scope
</html>
- It is also known as document root scope.
- It is technically referred to as “: root”.
Ex:
<!doctype html>
<html>
document-1
</html>
<html>
document-2
</html>
O/P:
- Every document scope comprises for information about which culture related content it is displayed.
- The cultures can be like “en-US, en-IN, en-UK etc.”
- The culture for HTML page is defined by using “lang” attribute.
- Culture specifies the display format of numbers, currency, date and time etc.
Syntax:
<html lang=”en-in”> </html>
Ex:
<!doctype html>
<html lang="en-in">
</html>
Post a Comment
Post a Comment