Skip to content

AvinandanBose/HTML-Revision-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

HTML

Introduction

HTML is a makup language commonly used to create Web pages.HTML is developed and maintained by World Wide Web consortium(W3C) .

  • Markup Language : A markup language provides a way to describe the structure of text and graphics on a Web page. HTML is derived from a general markup language called Standard Generalized Markup Language (SGML) , which is an International Organization for Standardization(ISO) technology that defines markup languages.
  • Hyper Text : The term Hyper signifies the navigation from one location to another in a non-linear fashion.In other words , clicking a hypertext on a Web page takes us to the relevant page on the content, i.e. the structure and the layout of a Web page with the hwlp of elements and attributes.
    • HTML 1.0→ Released in 1992. Provides the idea of seperation between the logical structure and presentational elements in a Web Page.
    • HTML 2.0→ Released in 1995. Updated version of HTML 1.0 . It introduced new features such as file uploading through a form, tables and client side image maps.
    • HTML 3→ Introduced in 1996. It includes the addition of FIG,LISTS, LINK and NOTE elements. It provides the support Updated version of HTML 1.0 . It introduced new features such as file uploading through a form, tables and client side image maps.
      • HTML 3.2 → It was introduced in early 1997 . It was released with the Character Data(CDATA) attributes and Document Type Declaration(DTD) to define the structure of an HTML Document. It has also omitted some features of HTML 3.1 , such as math formulas, and the BLINK and MARQUEE elements.

    • HTML 4→ Introduced in late 1997. It refers to a version that has introduced new elements for style sheets, scripts, frames, embedded objects, complex tables and forms. Apart from this it has provided improved accessibility features, such as accessing a form.
      • HTML 4.01 → It was introduced in late 1999 . This version has added the id attribute for all elements and has expanded the OBJECT element to include Java applets or any kind of external file in a Web page. It has also included the APPLET, EMBED, , and IMG elements and the feature of event capturing .

    • HTML 5→ Refers to the latest version of HTML , which was released in October 2009. HTML5 introduces a number of new elements and attributes such as AUDIO, VIDEO, and contentEditable , which allows us to create more interactive Web applications and websites.

    FUNDAMENTALS OF HTML

  • HTML TAGs: HTML is written in form of TAGs , which are pair of angle brackets(< and >) and some text placed between these angle brackets. The text present between a pair of angle brackets defines an HTML elements.
  • HTML Elements : Elements are building blocks of an HTML document. The browser interprets an HTML document on the basis of the element types that are added in the document. As a result, an HTML document is displayed with all the properties specified by the elements embedded in it.
  • The Structure of HTML ELEMENT : 1)An Opening/Starting TAG , 2) A Closing / Ending TAG, and 3) The content of the element enclosed between opening and closing TAG. Properties of Html Elements : 1)Attributes and 2) Content.

    <p> This is my first paragraph. </p>
    
    <p>→ It is the Opening TAG.
     
    </p>→It is the closing TAG.
    
    This is my first paragraph →The content of the element enclosed between opening and closing TAG.
    

  • ATTRIBUTES of ELEMENTS: The Attributes of an HTML element are placed within the opening tag(after the element's name) . Most of the HTML attributes are name-value pairs, seperated by '=' sign. However , some attributes such as ismap attribute of the img element is written without specifying a value for it.Attribute values should be enclosed within either single or double quotes.
  • Example :
    
    <p id = 'example' , lang="en"> This is an example of HTML </p>
    
    Here,
    
    Attributes: id , lang
    
    Value of Attributes : example , en
    

Categories of HTML Elements

    HTML elements are predefined , which means we cannot create our own tags and must use these predefined tags only. HTML elements are categorized into the following types:

    • Root
    • Metadata
    • Section
    • Heading
    • Flow
    • Phrasing
    • Embedded
    • Interactive

Begining of HTML Document [Root Elements]


1. The <!DOCTYPE> ELEMENT 

    The !DOCTYPE element is the first element is the HTML document, which specifies the Document Type Definition (DTD) used by the document. A DTD is a seperate file containing formal definition of grammar, such as supported elements and attributes used in markup language. The browser checks the code of the document against the rules in the !DOCTYPE declaration. The !DOCTYPE doesnot have a closing tag.

     Example :
     
    <!DOCTYPE html>
     


2. The <HTML> ELEMENT 

    The html element starts an HTML document and it comes after the !DOCTYPE element in an HTML document. It contains everything an HTML document contains except the !DOCTYPE element.

     Example :
    #------------------------------
     
    <html lang="en" class="html_class" dir="rtl" id="1" version="1" xmlns="http://www.w3.org/1999/xhtml"
    manifest="demo.appcache" draggable="true" contextmenu="mymenu" hidden="true" spellcheck="true" tabindex="1"
    style="color: red;" title="MyTitle" accesskey="char" xml:lang="en">
     
    </html>
    
    #----------------------------------
     
    Attribute Explanation
    class Represents the class of the element.
    dir Give the direction to directionally neutral text; We can set this attribute to ltr for left to right direction or rtl for right to left text direction.
    id Represents unique alphanumeric identifier for the element.
    lang Represents base language use for the element.
    version Represents the version of the language used. #This attribute has been marked as deprecated.
    xmlns Declares a XML namespace for custom tags in an HTML document.
    xml:lang Specifies base language used for an element in the eXtensible Hypertext Markup Language(XHTML) documents.
    manifest Define a URL(Universal Resource Locator) containing the document's cache information. #This attribute is depreciated.
    contenteditable Specifies whether content is editatble or not.
    contextmenu Specifies context menu for a specific element.
    draggable Specifies whether or not we can drag an element.
    accesskey Specifies keyboard shortcut to access an element.
    hidden Declares an element as a hidden element. Hidden elements are not displayed in the document.
    spellcheck Specifies whether an element should be checked for spelling and grammar or not.
    tabindex Specifies taborder index of an element.
    style Specifies inline style in the HTML document by using <style> element.
    title Specifies title of an HTML document.


3. METADATA ELEMENT 

    𝑻𝒉𝒆 𝒎𝒆𝒕𝒂𝒅𝒂𝒕𝒂 𝒆𝒍𝒆𝒎𝒆𝒏𝒕𝒔 𝒂𝒓𝒆 𝒖𝒔𝒆𝒅 𝒕𝒐 𝒔𝒆𝒕 𝒕𝒉𝒆 𝒑𝒓𝒆𝒔𝒆𝒏𝒕𝒂𝒕𝒊𝒐𝒏 𝒐𝒓 𝒃𝒆𝒉𝒂𝒗𝒊𝒐𝒓 𝒐𝒇 𝒕𝒉𝒆 𝒓𝒆𝒎𝒂𝒊𝒏𝒊𝒏𝒈 𝒄𝒐𝒏𝒕𝒆𝒏𝒕 𝒐𝒇 𝒂 𝒅𝒐𝒄𝒖𝒎𝒆𝒏𝒕. 𝑻𝒉𝒆 𝒆𝒍𝒆𝒎𝒆𝒏𝒕𝒔 𝒄𝒂𝒏 𝒂𝒍𝒔𝒐 𝒃𝒆 𝒖𝒔𝒆𝒅 𝒕𝒐 𝒔𝒆𝒕 𝒂 𝒓𝒆𝒍𝒂𝒕𝒊𝒐𝒏𝒔𝒉𝒊𝒑 𝒐𝒇 𝒂 𝒅𝒐𝒄𝒖𝒎𝒆𝒏𝒕 𝒘𝒊𝒕𝒉 𝒐𝒕𝒉𝒆𝒓 𝒅𝒐𝒄𝒖𝒎𝒆𝒏𝒕𝒔. 𝑻𝒉𝒆 𝒇𝒐𝒍𝒍𝒐𝒘𝒊𝒏𝒈 𝒊𝒔 𝒂 𝒍𝒊𝒔𝒕 𝒐𝒇 𝒎𝒆𝒕𝒂𝒅𝒂𝒕𝒂 𝒆𝒍𝒆𝒎𝒆𝒏𝒕𝒔:

    • 𝑻𝒊𝒕𝒍𝒆
    • 𝑩𝑨𝑺𝑬
    • 𝑪𝒐𝒎𝒎𝒂𝒏𝒅
    • 𝑴𝑬𝑻𝑨
    • 𝑵𝑶𝑺𝑪𝑹𝑰𝑷𝑻
    • 𝑺𝑪𝑹𝑰𝑷𝑻
    • 𝑺𝑻𝒀𝑳𝑬

    
    3.a. Title Element
    
    

About

Here we will get everything about HTML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published