Introduction to HTML

HTML

HTML - Hypertext Markup Language is a language of browser. Using HTML, web browser can interpret text, images,audio,
videos and other multimedia. It is not a programming language.

Markup language - Used to emphasize/mark a text example - highlight, underline, coloring etc.
HTML is markup language to make browser and server understand how the content in page has to be interpreted.
Both server and client understand HTML and browser can render the page with same understanding.

HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (CSS) or functionality/behavior (JavaScript).

"Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.

HTML uses "markup" to annotate text, images, and other content for display in a Web browser. HTML markup includes special "elements" such as <head><title><body><header><footer><article><section><p><div><span><img><aside><audio><canvas><datalist><details><embed><nav><search><output><progress><video><ul><ol><li> and many others.

An HTML element is set off from other text in a document by "tags", which consist of the element name surrounded by < and >. The name of an element inside a tag is case-insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <title> tag can be written as <Title><TITLE>, or in any other way. However, the convention and recommended practice is to write tags in lowercase.

Links are very important — they are what makes the web a web! To add a link, we need to use an <a> element, "a" being short for "anchor". 

Note: href might appear like a rather obscure choice for an attribute name at first. It stands for hypertext reference.

Lists

A lot of the web's content is lists and HTML has special elements for these. Marking up lists always consists of at least 2 elements. The most common list types are ordered and unordered lists:

  1. Unordered lists are for lists where the order of the items doesn't matter, such as a shopping list. These are wrapped in a <ul> element.
  2. Ordered lists are for lists where the order of the items does matter, such as a list of cooking instructions in a recipe. These are wrapped in an <ol> element.

Each item inside the lists is put inside an <li> (list item) element.

Basic Terminologies


Structure of HTML - html tag, head, body (Document structure element)
List elements - Ordered list, unordered list
Format - Strong, em, sub, sup, del, u or ins etc.
Forms Creation - Text, radio, checkbox, dropdown etc.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="Image/save.jpg" alt="Save Earth"/>
</body>
</html>

  • <!doctype html>: The doctype is a required preamble. In the mists of time, when HTML was young (around 1991/92), doctypes were meant to act as links to a set of rules that the HTML page had to follow to be considered good HTML, which could mean automatic error checking and other useful things. However, these days, they don't do much and are basically just needed to make sure your document behaves correctly. That's all you need to know for now.
  • <html></html>: The <html> element wraps all the content on the entire page and is sometimes known as the root element. It also includes the lang attribute, which sets the primary language of the document.
  • <head></head>: The <head> element acts as a container for all the stuff you want to include on the HTML page that isn't the content you are showing to your page's viewers. This includes things like keywords and a page description that you want to appear in search results, CSS to style the content, character set declarations, and more.
  • <meta charset="utf-8">: This element sets the character set your document should use to UTF-8, which includes most characters from the vast majority of written languages. Essentially, it can now handle any textual content you might put on it. There is no reason not to set this, and it can help avoid some problems later on.
  • <meta name="viewport" content="width=device-width">: This viewport element ensures the page renders at the width of the browser viewport, preventing mobile browsers from rendering pages wider than the viewport and then shrinking them down.
  • <title></title>: The <title> element sets the title of your page, which is the title that appears in the browser tab the page is loaded in. It is also used to describe the page when you bookmark/favorite it.
  • <body></body>: The <body> element contains all the content that you want to show to web users when they visit your page, whether that's text, images, videos, games, playable audio tracks, or whatever else. At the moment it only contains a single <img> element, but we'll add more content later on.
Sample Page :




































<!doctype html>
<html>
    <title>Images</title>
       
    <body>           
          <iframe width="560" height="315" src="https://www.youtube.com/embed/DrDm7uO4Fu0?rel=0" frameborder="0" allowfullscreen align="right"></iframe>            
           
         <p> <strong>Human Face</strong> </p>
        <img src = "https://upload.wikimedia.org/wikipedia/commons/thumb/9/98/Sobo_1909_260.png/1024px-Sobo_1909_260.png" height = 250 width = 150 align = "centre" />
       
       <form action = "https://www.google.com">
            <p> God is great he has created wonderful human being </p>
            <p> Login to check : <br> username : <input type = "text" value = "user name" placeholder="Your name" > </p>
            <p> Password : <input type = "text" > </p>
            <p> Select from the dropdown list : </p>
        <select>
            <option> Nose </option>
            <option> Mouth</option>
            <option> Teeth </option>
            <option> Ear</option>
            <option selected> Forehead </option>
        </select>
            <hr color="Blue">
            <p1> Survey : </p1>
            <br> Do you like the food <input type="radio" name="exclusive option" value ="opt 1" >
            <br> Do you like the Dance <input type="radio" name = "exclusive option" value = "opt2">
            <br> Mark if all the answers are checked <input type = "checkbox" cheked>
            <p> <input type="Submit" value = "Click to complete" > </p>
        </form>
    </body>
</html>




Comments