MCQ Sets

  • Mock Ups
    • Computer Operator
      • 73-01
      • 73-02
      • 73-03
      • 73-04
      • 73-05
      • 73-06
    • Assistant Computer Operator
  • Quiz
    • Computer Fundamentals
    • Operating Systems
    • MS Word
    • MS Excel
    • MS PowerPoint
    • MS Access
    • HTML
  • Sets
    • Computer Fundamentals
    • Operating System
    • Microsoft Word
    • MS Excel
    • MS PowerPoint
    • MS Access
    • HTML & Web Page Designing
    • C++
    • Data Structures & Algorithms
  • Read
    • Tips & Articles
    • Fundamentals
    • MS Word
    • DBMS
    • Operating Systems
    • HTML & Web Page Design
  • Videos
  • Ask
    • Ask MCQ Sets
    • Discussion Forum
  • Downloads
  • Old Question Papers

HTML Document Structure – Post #2 – HTML Tutorials

Updated: June 30, 2017     Written/composed/compiled by:  Suresh Khanal

Today, we’ll look into the HTML document structure and try to get familiar with different parts of an HTML page.

In our last session, we discussed about the term HTML, the look and contents of a html file, required applications to edit html, and finally created a simple html page. That was really simple, wasn’t it?

Read: Getting Started – HTML Tutorials

HTML Document Structure

Considering HTML version 4 and later, an HTML document has three main parts:

  1. Document type declaration (DTD) at the toptions
  2. HTML element containing following elements
    1. Head
    2. Body

html document structure

Refer to the example above. Did you notice the red text and the black text. The text in black are the content and the red text are the tags (what are they?) which constitutes elements.

html element

Document Type Declaration (1)

The first line in the example above isn’t an element, but it is a document type declaration (also called DOCTYPE declaration). It tells the version information of an HTML document. It lets modern browsers know they should interpret the document as written according to the HTML specification. A valid HTML document declares what version of HTML is used in the document.

Refer: Information about DOCTYPE

HTML Element (2)

The entire document is contained within an html element. The html element is called the root element because it contains all the elements in the document, and it may not be contained within any other element. It is used for both HTML and XHTML documents.

Within the html element, the document is divided into a head and a body.

Head Element (3)

The head element contains descriptive information about the document itself. The contents mentioned here is not to display in browser but to pass some information to the browsers such as its title, the style sheet(s) it uses, scripts, and other types of “meta” information.

The Meta Element (4)

The meta elements inside the head element provide information about the meta data. A meta element can be used to provide different sort of information. In above example it specifies the character encoding used in the document.

Note: meta data means the information about a document rather than document content

The Title Element (5)

The head also contains the mandatory title element. According to the HTML specification, every document must contain a descriptive title. The title you specify in this element is displayed in the title bar (or tab) of browsers.

The Body Element (7)

Finally, the body element contains everything that we want to show up in the browser window. This is the part of HTML document that is displayed in browser.

Points to Remember

  • A Tag in HTML is a label for enclosed content that tells browser how the content should be presented in browser.
  • Any HTML document has three parts – Type definition, Head & Body
  • HTML 5 is defined simply with <!DOCTYPE html> while HTML 4 has 3 different types of type definitions – Strict, Transitional & Frameset.
  • <html> is the root element which can’t go inside any other element.
  • <head> and <body> elements are nested inside <html> element.
  • <head> part of HTML document contain information for the browser so that it can render the web page correctly.
  • <body> part of HTML document contains all the contents that should be displayed in browser window.
  • An HTML element is the combined form of opening tag, content and a closing tag.
  • Doctype declaration tells browser about the standard it follows.
  • <head> element can contain document title, style sheets, scripts and meta data.
  • Meta data is the information about a document rather than document content.

HTML MCQ Questions

Click the link below to visit MCQ Questions page from this chapter:

HTML Elements MCQ Questions for 2016 CO Exam

Your Questions & Confusions

  1. Visit following link
    /website-designing/
  2. Log in using your Facebook, Google, Yahoo accounts. (Use the Log in buttons on right sidebar. If you are viewing this page in mobile device, you’ll find the login buttons below)
  3. Post your questions or confusions. You are equally welcomed to answer other member’s questions there.

Comments, Suggestions & Feedback

We’ve a comment form below this post. You’re most welcome to write your comments, suggestions or feedback. They are highly appreciated.

Filed Under: HTML & Web Page Design Tagged With: doctype, html document, html document structure, html element, html tutorials

← HTML Headings – Post #6 – HTML Tutorials HTML Tutorial – Post #1 – Getting Started →

Comments

  1. namrata says

    April 4, 2016 at 1:27 pm

    useful to all computer examer.thanks

    Reply
  2. zillur says

    April 11, 2016 at 7:46 pm

    thanks for sharing with all of us.

    Reply

Leave a Reply Cancel reply

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

User manuals http://manymanuals.com

Published MCQs for:

  • Computer Fundamentals
  • Operating Systems (Basics)
  • Word Processing (MS Word)
  • Spread Sheet (MS Excel)
  • Presentation (MS PowerPoint)
  • DBMS (MS Access)
  • Webpage Designing (HTML)
  • C++ Programming Language
  • Data Structures & Algorithms

Reading Materials for:

Fundamentals of Computers
► Syllabus of Computer Fundamentals
► Introduction to Computer Fundamentals
► History of Computers
► Computer Generations
► Classification of Computers
► Computer System
► Computer Hardware Concept
► Computer Software Concept
► Computer Networking
► Number System

Recent Posts

  • JavaScript MCQ Questions And Answers PDF Free Download
  • Which of the following is not an operating system?
  • Computer Networks MCQ Questions and Answers with PDF Download
  • Online Quiz MS PowerPoint
  • Solved Question Paper of PSC for NARC 2074-2-18

MCQ Sets

  • Home
  • About Us
  • Contact Us
  • Privacy Policy
  • User Testimonials
  • Help MCQ Sets Grow More!
  • RSS Feeds
  • Sitemap

Recent Comments

  • sabita pokharel on Ask MCQ Sets
  • Prince Danso on Download MCQ Questions Bank for HTML [PDF]
  • Suresh Khanal on Microsoft Excel MCQ Questions – The First 100 MCQs
  • Suresh Khanal on Online MCQ Quiz for Fundamentals of Computers
  • Puspamunjali on Online MCQ Quiz for Fundamentals of Computers