VKS-LEARNING HUB

Home » Class-XI » MMWT-XI » Starting HTML

Starting HTML

HTML stands for Hypertext Markup Language, and it is the most widely used language to write Web Pages.

Hypertext refers to the way in which Web pages (HTML documents) are linked together. When you click a link in a Web page, you are using hypertext.  Hypertext allow users to navigate from one location to another location in same page , different pages in same website or different servers.

Markup Language describes how HTML works. With a markup language, you simply “mark up” a text document with tags that tell a Web browser how to structure it to display.

To Create a HTML Documents We required Two Things

  1. HTML Editor—Text Editors Like NOTEPAD, NOTEPAD++, SIMPLE TEXT, TEXTPAD, FIRSTPAGE  etc.  can be used to create and save HTML documents  or we can also use WYSIWYG Editors Like Dreamweaver, Microsoft FrontPage
  2.  A Web Browser – Like Microsoft Internet Explorer, Google Chrome, Mozilla, Firefox, Opera  etc.  A Web Browser is a client software that allow users to display and interact with HTML documents. Browser interpret html code and display it with markup  element

TEXT EDITORS

WYSIWYG EDITORS

It used to write HTML Coding for designing a Webpage It is Used for designing a webpage using graphical editor, HTML code is generated automaticlly
You can see the output of the webpage coded on web browsers after saving the file in .html and opening the file in browsers You can check the webpage while coding as there is inbuilt browser come with these editors to show the output
Notepad, Simple Text, Text pad,  etc. are the examples of text editors Dreamweaver, Microsoft FrontPage etc. are the examples of text editors

 All HTML documents are saved with .html or .htm file extension to be seen on web browser. Files saved in .txt will not open on web browser as webpage, If you are using Notepad  save you file with .html

HTML IS NOT CASE SENSITIVE

TAGS :  Tags are used to mark-up certain information to be displayed in a browser. For the content to be marked-up it has to have an opening tag (<tag>) before the content and a closing tag (</tag>) afterwards.

In HTML you control text and information by wrapping tags around them. Tags begin with a less than symbol (<) and end with a more than symbol (>) i.e. <tagname>.

All elements in HTML must have an opening tag and a closing tag i.e.

<tagname>content</tagname>. A closing HTML tag looks the same as an opening tag except it has a forward slash (/) directly before the tag name.

Physical Tags

Logical Tags

Physical tags are used for explicit formatting. Browser are forced to use tag specified and show it in the same manner Logical tags are used for implicit formatting. Browser choose how the tags to be shown depending upon the compatibility
Browser can’t choose alternative display for tags, means if it cannot show specific tag then it will show the unformatted text Browser can choose the alternative display for tags if particular tag not supported
They Generally be used in combination of other tags Ex <B> and <I> <Strong> & <EM>

Container  Tags

EMPTY/or Non Container Tags

Tags which required both Opening and closing tags are container tags Tags which required only Opening tags are non container tags or Empty tag
They can contain other tags within them They cannot contain other tags within them
<Body></Body><html><html> <br>, <hr> <img>

A HTML document is basically separated in two parts: the head (HTML head tag) and the body (HTML body tag). We also add a Document type declaration on top of it to get the basic document structure and HTML version.  The structure of a HTML document is shown below.

Structure of HTML program:

<! DOCTYPE …>  version information

<HTML>

<HEAD>

…information about document, scripts, styles….

</HEAD>

<BODY>

…visible content of document….

</BODY>

</HTML>

§  The !DOCTYPE declaration: Every well written HTML document begins with a basic declaration that defines what type of document it is. This declaration is made using the!DOCTYPE tag and is to be written at the beginning of the document. It tellS the processing agent and HTML version. Sample is shown below.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0//EN”>

§  <HTML> tag: The html tag acts as a container for the whole document. Every character in the document should be in between the html start and end tags. The html tag can also be used to define the language of the contained document through the “lang” attribute. The content of the html tag is divided in two parts using the head (HTML head tag) and the body (HTML body tag).

§  <HEAD> tag: This section is the document’s head. All the information contained in the document’s head is loaded first, before any other thing in the document, as it’s defined before the body segment. It includes tags like title, script, style, meta and so on.

§  <BODY> tag: This is the document’s body: The body is the container for the visual part of a document. All the things written here will be shown when the document is rendered. Most of the tags in HTML can be inserted in the body section (inside the HTML body tag) and will take care of the visual aspects of the document.

Example:

<HTML>

<HEAD>

<TITLE> My first Page </TITLE>

</HEAD>

<BODY>

<H1> Hello HTML <H1>

COMMENT TAG

Comment Tag is used to hide the text from being displayed in the browser

Comment Tag start with  <!- –  and ends with — > any thing in between <! – – and – – > will be treated as comment and browser will not interpret and ignore it it will not be shown on webpage

</BODY>

</HTML>

Previous

Solved Examples

Unsolved Questions for Practice

Next


Leave a comment