HTML - InshortsView

|
Divnesh BLOG
Presentation Layer

HTML (Hyper Text Markup Language)
  • Hypertext is the text displayed on a computer which refers to other text or image that the user can access
  • Markup language is a set of tags which helps the web browser in presenting text in a document
HTML can:
  • Publish documents with text, headlines, images etc
  • Create forms to collect user data
  • Include videos, audio clips, flash movies etc. inside an HTML document
  • Access online information via hyperlinks
Skeleton of a HTML page
Before HTML5, HTML elements in the body were categorized either into "block-level" or "inline".
  • Inline element : Can start anywhere in the line. It may contain only data and other inline elements
 

 





  • Block level element : Begins on a new line. It may contain inline element and block level elements 

Body Element








Form Element
Forms are used for collecting user information which may be for registration, payment etc. For example, in case of registration data such as name, email ID, phone number etc are required.
To create a form in HTML, 
 tag is used. 

Attributes of Form Element
Label Element
For creating a label we use label tag. Every label should be associated with an input element like inputselect and textarea.
<div>
<label for="name">Username</label>
<input type="text" id="name">
</div>
<input  type="text"  id="input1" required/>
Input Types

Select Element
   <label for="cars">Choose a car:</label>
<select name="cars" id="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
  
Textarea Element

Button Element

Table Element
 is used to define a row inside a table.
 is used to define a column(or cell) inside a table.
 is used to provide headings for columns.
 and  should always be inside a  .
Note - table head,   - table row,  - table data
Anchor Element
<a href="URL for the link"> Text </a>
Attributes of Anchor Element

Media Content
imgaudio and video tags.
Image Element
<img src="path_to_image" alt="image_text">

Can we make an image to act as a link ?
<a href="demo.html">
<img src="image.jpg" alt="Image cannot be found">
</a>
Audio and Video Elements
<audio src="sample-audio.mp3" controls muted>

    Your browser doesn’t support this tag

 </audio>
Below example will play the video with playback controls as soon as the page is loaded.
<video src="sample-video.mp4" poster="frame.jpg" controls autoplay

  Your browser doesn’t support this tag

</video>
Text Formatting Elements

Unordered List

<ul type="circle">
    <li>Cake</li>
    <li>Biscuits</li>
    <li>Fruits</li>
</ul>
Ordered List

<ol type="1">
    <li>Cake/li>
    <li>Biscuits</li>
    <li>Fruits</li>
</ol>
Definition List
<dl>
  <dt>Books</dt>
  <dd>printed work consisting of pages glued along one side and bound in covers/dd
  <dt>Pencil</dt>
  <dd>a item used for writing</dd>
</dl>
Character Entity References






Featured Post

HTML cheetsheet

List: Link tgs Dropdown

Popular Post

(C) Copyright 2018, All rights resrved InShortView. Template by colorlib