1 / 7

Html

Notes for Students

Advait
Download Presentation

Html

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTML(Hyper Text Markup Language) • HTML is a structured markup language that is used to create web-pages. It is collection of codes, called elements, which indicate the structure & format of a document. • In other words, it is a text file containing small tags which tell the browser how to display the page. • An Html file will have .htm or .html as extension • To create a html file, you need a text editor Example:- windows --- notepad

  2. Html Rules & Guidelines • Html documents are structured documents • Element names are not case-sensitive. Ex:- <Html> or <hTML> or <HTML> all are same. • Attribute names aren’t case-sensitive. • Attribute values may be case-sensitive. • Attribute values should be given in quotes. • Element names cannot contain spaces. • Html documents may contain comments. • Elements should nest. • Browser ignores unknown elements. <Book> </Book> • Browsers ignore unknown attributes . <Img clown = “Bozo” Src = “bozo.gif” >

  3. Structure of Html document Any Html document will have the following structure. Though need not always include all the element,but will generally follow this structure. <! Doctype Html public “html version”> <Html> <Head> <Title> Document structure </Title> ……….. Other info </Head> <Body> ………..Marked-up text goes here </Body> </Html> • <! Doctype>:- To indicate as to which version of Html we are using.

  4. <Html> element:- The <Html> element indicates the beginning and end of an Html document. It is a container for all other elements. It contains <Head> and <Body> element. • <Head> element:- It contains identification & supplementary information about the document. This element is optional. The <Head> element includes <style>, <Title>etc. 1.<script> element:- It allows programs written in a scripting language to be directly embedded in a web page. Ex:- Vbscript, Javascript. 2. <style> element:- It encloses style specifications covering fonts, colors, positioning & other aspects of content presentation. 3. <Title> element:- It is used for declaring the title or name of the HTML document. A document title may contain standard text as well as character entities.

  5. <Body> element:- The text that is to be marked up is shown in the body element of Html document. Common attributes of body element are • Text -- for text-color • Bgcolor – for background color • Alink – for active link color • Vlink – for visited link color • Link – for unvisited link Nearly all Html elements have four core attributes • Id :- Id is used to set a unique name for a tag in a document. • Class:- Class is used to indicate the class or classes that a tag may belong to. Class name need not be unique. • Style:- Style is used to add stylesheet information directly to a tag. • Title:- Title is used to provide advisory text about a tag or its contents. It is displayed in the form of tooltip.

  6. Common basic Html elements/tags • The Html tags can be divided into the following:- • block-level elements, • text-level elements, • computer-output elements(logical text elements), • character entities. Block-level elements:- i) <p>….</p>(paragraph):- Paragraph is used to define a new paragraph .The paragraph element inserts a blank line before and a line after the paragraph. ii) Headings:- Headings are defined with <h1> to <h6> tags. <h1> defines the largest and <h6> defines the smallest heading. It will have closing tags </h1> to </h6>. Html adds a blank line before and after a heading. iii) Line breaks:- The <br> tag is used when you want to end a line, but don’t want to start a new paragraph.This does not have an end tag. It is an empty tag. iv) comments:- The comment tag is used to insert a comment in Html source code. A comment will be ignored by the browser.< ! -- -- >

  7. Formatting Html defines a lot of elements for formatting output, like bold or italic text. The following are the text-level elements(text formatting elements):-

More Related