Chapter-2 HTML Concept

You might also like

Download as pdf
Download as pdf
You are on page 1of 47
HTML In This Chapter, we will Learn: ¢ Learn the origin and basics of HTML © Opening and saving an HTML code ¢ Understand text formatting tags ¢ Learn to create ordered and unordered list in an HTML document ¢ Learn to insert Graphics, Frames and Tables in an HTML document © Learn to insert Copyright, Trademarks symbols in a Web page. 2.0 INTRODUCTION : HTML BASICS A Web Page is a document composed of text, images, sound, animation, video and special codes called Tags. One very basic and commonly used markup language is HTML (Hyper Text Markup Language) which is a specialised programming language, designed to display and access Web pages. ‘Access to a Web page is made through a special type of program called browser. The two most popular browsers are Netscape Navigator and Microsoft Internet Explorer. Markups are nothing but the tags used for some purpose. Tags are identified by <>opening tags or closing tags signs. The commands themselves are specified between <> sign (also known as opening tags). In case of tag which need to enclose text then ending tag should include image to indicate the end of tag. Tags are not case sensitive. SGML (Standard Generalized Markup Language) is a set of standards proposed by World Wide Web Consortium (W3C) for all markup languages to follow. The code consists of two types of tags. (i) Empty tags : Empty tags are stand-alone tags because they do not require a closing tag. (ii) Container tags : These tags wrap around text or graphics and they come in a set with an opening tag and a closing tag. For Example : Affected Text HTML tags are comprised of elements, attributes and values. Tag elements 2.2 E-commerce to change and attributes control how use, are usually what user wants i ; Jue that sets the specific attribute. A tag elemen wants it. Each attribute has a val can have multiple attributes. Syntax : Affected text For Example : The text is in arial font size 3 < /font> 2.1. BASIC STRUCTURE OF AN HTML DOCUMENT To build any Web page, four primary tags are needed : , , and <body>. These are all container tags and must appear as pairs. <htmP-....</html> Every HTML document must start with <html> and end with </html>. This tells the browser that the following file is an HTML file. <head>....</head> This tag contains the title of the document along with general information about the file, like the author, Copyright, keywords, etc. <title>.... Text within these tags appear in the title bar at the very top of the browser page. .... All the text images, links, tables and other information that should appear on the Web page is placed between these two tags. Example 1: Simple Illustration of HTML Program or sacle S text will appear in the Title bar This eae wil] appear on the web page HTML 23 The Output Will Be : SE Re en nee al cal eal Fle Edt View Favorites Tools Help & OO PAO SYOas4 a Adress | \iMoht\ctsustila Madante-commerce|Output\éxanple htm | Eco rks This text will appear on the web page @hoore “Tocalintranet Note: HTML is a flexible language. It does not mind if any of the basic building tags is missing, but it is always a good programming practice to use the tags in proper hierarchy. 2.1.1 Saving an HTML File The Code given above is typed in Notepad. In order to save it as an HTML document, go to the File Menu and click on Save As option. Make sure you are in the correct drive and then type in a file name and add the extension. ‘html’ or ‘htm’. Most importantly, change the “Save as type” Text Document to All types so that the html file extension is accepted. 2.1.2 How to Open an HTML File (1) Open the Web-browser, (2) In the Menu bar, select File menu, Open Option, (3) Find your file by clicking on Browser, and (4) Click on Open. After making changes to the page in Notepad, always save your work. Then go back to the browser and refresh your page to see the changes made. Tag Codes and Their Effect Bold Italics [ <>
  • Underline <> i _ Small (one font size smaller than the current size) [a (one font size bigger than the current size) | | Marquee (scroll) 2.1.3 Nesting Codes . . You can apply multiple features to a block of text. This is called nee ot important thing to remember is that all the codes that start (begin) late should end first. There should be no intersections. The policy followed while using tags in nesting is LIFO (Last In First Out). Correct Example : Learning Nesting Incorrect Example : Learning Nesting 2.2 TEXT FORMATTING TAGS e Headings Headings are used to divide or assign Headings to a Web page’s content. Heading code consists of < Heading No.> Heading Text , The Heading No. is replaced with a number from | to 6. Heading No.___Font size in points Heading No. Font size in points T 18 a R 2 16 3 10 f 3 14 6 8 Headings will always leave a blank line above and below and will always be bold. Heading can use attributes such as align to decide if the heading should be right aligned, left aligned or centered. For Example : Text Heading e Line Breaks The break code inserts a carriage return. It is just like pressing enter key on the keyboard where it takes you to the next line. Breaks can be given in text in order to break the line and continue the text on next line. Breaks do not have a closing tag, it is an empty tag. . i.e.
    . Breaks are standalone (empty) tags. © Font The font element is used to decide the look will be displayed. It has the following ibe Dlock of text and how © Size Text of affect KHEAD>Heading and Font Sizes <1>Different Heading Sizes : KH1>Heading 1

    Heading 2

    Heading 3

    KHa>Heading 4Heading 5
    Heading 6
    KI>DiPferent font Sizes : Size 1

    Size 2
    Size 3
    ‘Size 4
    ‘Size 5
    Size 6
    The Output Will Be : [across wohcsusha Mderie-cmercelovoutiearcle 2. il Different Heading Sizes : Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Honaing 6 Different font Sizes : For sin Font Size 2 Font Size 3 Font Size 4 © Color attribute assigns color to the font. text to affect 2.6 Escommeny on the interest is RGB, which consists of , ) to 255 in decimal notation, or 0 (zero) ' bute values take one of the following The standard color mode used set of three values from 0 (zero, fT in hexadecimal notation, Color attr! forms : “# RRGGBB”, where RR, GG and BB are red, green and blue components of the color, Few of the colors widely used are : Color Name RGB Values | Color Name RGB Values Black = #000000 Green = #008000 Silver = #e0c0c0 Lime = #00ff00 Grey = #808080 Olive = #808000 White = HERR Yellow = #ffF00 Maroon = #800000 Navy = #000080 Red = #70000 Blue = #0000fF Purple = #80080 = #008080 Fuchsia = #ffCOfT Aqua = #00ffff © Face attribute assigns stylc to the font. text to affect Some of the font styles that the browser can identify are: Arial, Bookman Old Style, Gourmand, Century Gothic, Times New roman, Verdana, Courier New, Book Antiqua. Combine the attributes : Text to affect e Paragraphs The paragraph code sets up paragraphs in a format where text is single spaced with one blank line between paragraphs. The paragraph code cannot be combined to insert blank lines but the align attribute can be used to set up text in different positions. For Example :

    e Blockquote The
    element is used to double indent a paragraph, which means to indent both sides of a paragraph. This is mostly used for quotes: J y 2.7 tis also a good idea to double a noticeable. le up on this code so that the indents are more For Example :
    | efolockquate> ‘quote> text to be double indented
    e Pre-formateed Text anaemic li the text exactly as it is typed with tabs and carriage lett led. The only problem is that it changes the font to typed text - or courier font. typ’ For Example :
     pre-formatted text 
    e Division Divisions are used to divide content into sections. It allows the user to apply the same alignment to several paragraphs or a large area of text at once. For Example :
    paragraph text
    ¢ Horizontal Rule Line The
    tag inserts a horizontal rule line, basically a line that goes across the page. This tag is an empty tag, therefore, a space and a slash appear at the end of the tag. The
    tag has several attributes that the user can include. It should be noted that the attributes are never stand alone. Size =“value” (in pixels) to denote line thickness Width =“value” (in pixels or Yoage) to denote length across page Align = “right/left/center” Noshade (if you want a flat look rather than 3D shading). Color =“color name”/ “RRGGBB?” to fill the line with a color For Example :
    Address This tag is used to specify the author’s or end of a page. Addresses are usually with line breaks above & below. information mostly at the beginning placed at the left hand side in italics i... 28 commer, For Example :
    Author's Information
    2.2.1 Comments in HTML Comments are meant for the purpose of adding descriptions etc. to make thy code easily understandable. Comments are simply ignored at the time o Processing and are not shown on the output. There are two tags that can be used for the purpose of incorporating comments in an html page : 1, This is a comment Note : This tag has become obsolete now. | 2, From Everand
    The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
    Rating: 4 out of 5 stars
    4/5 (5835)
  • The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
    The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
    From Everand
    The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
    Rating: 4 out of 5 stars
    4/5 (1093)
  • Never Split the Difference: Negotiating As If Your Life Depended On It
    Never Split the Difference: Negotiating As If Your Life Depended On It
    From Everand
    Never Split the Difference: Negotiating As If Your Life Depended On It
    Rating: 4.5 out of 5 stars
    4.5/5 (852)
  • Principles: Life and Work
    Principles: Life and Work
    From Everand
    Principles: Life and Work
    Rating: 4 out of 5 stars
    4/5 (612)
  • The Glass Castle: A Memoir
    The Glass Castle: A Memoir
    From Everand
    The Glass Castle: A Memoir
    Rating: 4.5 out of 5 stars
    4.5/5 (1720)
  • Grit: The Power of Passion and Perseverance
    Grit: The Power of Passion and Perseverance
    From Everand
    Grit: The Power of Passion and Perseverance
    Rating: 4 out of 5 stars
    4/5 (590)
  • Sing, Unburied, Sing: A Novel
    Sing, Unburied, Sing: A Novel
    From Everand
    Sing, Unburied, Sing: A Novel
    Rating: 4 out of 5 stars
    4/5 (1194)
  • Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
    Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
    From Everand
    Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
    Rating: 4 out of 5 stars
    4/5 (903)
  • Shoe Dog: A Memoir by the Creator of Nike
    Shoe Dog: A Memoir by the Creator of Nike
    From Everand
    Shoe Dog: A Memoir by the Creator of Nike
    Rating: 4.5 out of 5 stars
    4.5/5 (541)
  • The Perks of Being a Wallflower
    The Perks of Being a Wallflower
    From Everand
    The Perks of Being a Wallflower
    Rating: 4.5 out of 5 stars
    4.5/5 (2107)
  • The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
    The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
    From Everand
    The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
    Rating: 4.5 out of 5 stars
    4.5/5 (350)
  • Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
    Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
    From Everand
    Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
    Rating: 4.5 out of 5 stars
    4.5/5 (474)
  • Bad Feminist: Essays
    Bad Feminist: Essays
    From Everand
    Bad Feminist: Essays
    Rating: 4 out of 5 stars
    4/5 (1029)
  • The Outsider: A Novel
    The Outsider: A Novel
    From Everand
    The Outsider: A Novel
    Rating: 4 out of 5 stars
    4/5 (1872)
  • Her Body and Other Parties: Stories
    Her Body and Other Parties: Stories
    From Everand
    Her Body and Other Parties: Stories
    Rating: 4 out of 5 stars
    4/5 (824)
  • The Sympathizer: A Novel (Pulitzer Prize for Fiction)
    The Sympathizer: A Novel (Pulitzer Prize for Fiction)
    From Everand
    The Sympathizer: A Novel (Pulitzer Prize for Fiction)
    Rating: 4.5 out of 5 stars
    4.5/5 (122)
  • The Emperor of All Maladies: A Biography of Cancer
    The Emperor of All Maladies: A Biography of Cancer
    From Everand
    The Emperor of All Maladies: A Biography of Cancer
    Rating: 4.5 out of 5 stars
    4.5/5 (271)
  • Angela's Ashes: A Memoir
    Angela's Ashes: A Memoir
    From Everand
    Angela's Ashes: A Memoir
    Rating: 4.5 out of 5 stars
    4.5/5 (443)
  • Brooklyn: A Novel
    Brooklyn: A Novel
    From Everand
    Brooklyn: A Novel
    Rating: 3.5 out of 5 stars
    3.5/5 (1948)
  • The Little Book of Hygge: Danish Secrets to Happy Living
    The Little Book of Hygge: Danish Secrets to Happy Living
    From Everand
    The Little Book of Hygge: Danish Secrets to Happy Living
    Rating: 3.5 out of 5 stars
    3.5/5 (405)
  • Steve Jobs
    Steve Jobs
    From Everand
    Steve Jobs
    Rating: 4.5 out of 5 stars
    4.5/5 (809)
  • A Man Called Ove: A Novel
    A Man Called Ove: A Novel
    From Everand
    A Man Called Ove: A Novel
    Rating: 4.5 out of 5 stars
    4.5/5 (4772)
  • The World Is Flat 3.0: A Brief History of the Twenty-first Century
    The World Is Flat 3.0: A Brief History of the Twenty-first Century
    From Everand
    The World Is Flat 3.0: A Brief History of the Twenty-first Century
    Rating: 3.5 out of 5 stars
    3.5/5 (2259)
  • The Art of Racing in the Rain: A Novel
    The Art of Racing in the Rain: A Novel
    From Everand
    The Art of Racing in the Rain: A Novel
    Rating: 4 out of 5 stars
    4/5 (4214)
  • The Yellow House: A Memoir (2019 National Book Award Winner)
    The Yellow House: A Memoir (2019 National Book Award Winner)
    From Everand
    The Yellow House: A Memoir (2019 National Book Award Winner)
    Rating: 4 out of 5 stars
    4/5 (98)
  • Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
    Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
    From Everand
    Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
    Rating: 4.5 out of 5 stars
    4.5/5 (266)
  • A Tree Grows in Brooklyn
    A Tree Grows in Brooklyn
    From Everand
    A Tree Grows in Brooklyn
    Rating: 4.5 out of 5 stars
    4.5/5 (1930)
  • A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
    A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
    From Everand
    A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
    Rating: 3.5 out of 5 stars
    3.5/5 (231)
  • Yes Please
    Yes Please
    From Everand
    Yes Please
    Rating: 4 out of 5 stars
    4/5 (1905)
  • Team of Rivals: The Political Genius of Abraham Lincoln
    Team of Rivals: The Political Genius of Abraham Lincoln
    From Everand
    Team of Rivals: The Political Genius of Abraham Lincoln
    Rating: 4.5 out of 5 stars
    4.5/5 (234)
  • The Woman in Cabin 10
    The Woman in Cabin 10
    From Everand
    The Woman in Cabin 10
    Rating: 3.5 out of 5 stars
    3.5/5 (2526)
  • Wolf Hall: A Novel
    Wolf Hall: A Novel
    From Everand
    Wolf Hall: A Novel
    Rating: 4 out of 5 stars
    4/5 (3973)
  • Fear: Trump in the White House
    Fear: Trump in the White House
    From Everand
    Fear: Trump in the White House
    Rating: 3.5 out of 5 stars
    3.5/5 (738)
  • John Adams
    John Adams
    From Everand
    John Adams
    Rating: 4.5 out of 5 stars
    4.5/5 (2410)
  • On Fire: The (Burning) Case for a Green New Deal
    On Fire: The (Burning) Case for a Green New Deal
    From Everand
    On Fire: The (Burning) Case for a Green New Deal
    Rating: 4 out of 5 stars
    4/5 (74)
  • The Light Between Oceans: A Novel
    The Light Between Oceans: A Novel
    From Everand
    The Light Between Oceans: A Novel
    Rating: 4.5 out of 5 stars
    4.5/5 (789)
  • Manhattan Beach: A Novel
    Manhattan Beach: A Novel
    From Everand
    Manhattan Beach: A Novel
    Rating: 3.5 out of 5 stars
    3.5/5 (880)
  • The Constant Gardener: A Novel
    The Constant Gardener: A Novel
    From Everand
    The Constant Gardener: A Novel
    Rating: 3.5 out of 5 stars
    3.5/5 (104)
  • The Unwinding: An Inner History of the New America
    The Unwinding: An Inner History of the New America
    From Everand
    The Unwinding: An Inner History of the New America
    Rating: 4 out of 5 stars
    4/5 (45)
  • Rise of ISIS: A Threat We Can't Ignore
    Rise of ISIS: A Threat We Can't Ignore
    From Everand
    Rise of ISIS: A Threat We Can't Ignore
    Rating: 3.5 out of 5 stars
    3.5/5 (137)
  • Little Women
    Little Women
    From Everand
    Little Women
    Rating: 4 out of 5 stars
    4/5 (105)
  • Discussion
    Discussion
    Document1 page
    Discussion
    A1cyb Cafe
    No ratings yet
  • Chapter 3 Electronic Payment System
    Chapter 3 Electronic Payment System
    Document24 pages
    Chapter 3 Electronic Payment System
    A1cyb Cafe
    100% (1)
  • A.Q Business Environment
    A.Q Business Environment
    Document1 page
    A.Q Business Environment
    A1cyb Cafe
    No ratings yet
  • DT - Assignment PDF
    DT - Assignment PDF
    Document1 page
    DT - Assignment PDF
    A1cyb Cafe
    No ratings yet
  • Assignment Cost Accounting
    Assignment Cost Accounting
    Document1 page
    Assignment Cost Accounting
    A1cyb Cafe
    No ratings yet
  • Assignment Business Communication
    Assignment Business Communication
    Document1 page
    Assignment Business Communication
    A1cyb Cafe
    No ratings yet
  • BBA-108-E-Commerce Unit One PDF
    BBA-108-E-Commerce Unit One PDF
    Document25 pages
    BBA-108-E-Commerce Unit One PDF
    A1cyb Cafe
    No ratings yet
  • BBA-108-E-Commerce Unit-TWO PDF
    BBA-108-E-Commerce Unit-TWO PDF
    Document50 pages
    BBA-108-E-Commerce Unit-TWO PDF
    A1cyb Cafe
    No ratings yet
  • BBA-108 - E-Commerce Unit THREE & FOUR
    BBA-108 - E-Commerce Unit THREE & FOUR
    Document34 pages
    BBA-108 - E-Commerce Unit THREE & FOUR
    A1cyb Cafe
    No ratings yet
  • 108 Lab Assignment PDF
    108 Lab Assignment PDF
    Document1 page
    108 Lab Assignment PDF
    A1cyb Cafe
    No ratings yet
  • Modelling Reflection
    Modelling Reflection
    Document1 page
    Modelling Reflection
    A1cyb Cafe
    No ratings yet