Tuesday, 6 December 2016

HTML Lists

  1. HTML offers three ways for specifying lists of information. All lists must contain one or more list elements.
  2. <ul> - An unordered list. This will list items using plain bullets.
    The Unordered list starts with <ul> tag and list items start with the <li> tag.
    You can use type attribute for <ul> tag to specify the type of bullet you like. By default it is a disc. But you can change to square or circle
  3. <ol> - An ordered list. This will use different schemes of numbers to list your items.
    The numbering starts at one and is incremented by one for each successive ordered list tagged with <li>.
    You can use type attribute for <ol> tag to specify the type of numbering you like. By default it is a number.
    But you can change to Roman Numbers(I),Small roman numbers(i), alphabets(A), small aplhabets (a).
    You can use start attribute for <ol> tag to specify the starting point of numbering you need.
  4. <dl> - A definition list. This arranges your items in the same way as they are arranged in a dictionary.
    <dl> - Defines the start of the list.
    <dt> - Defines a term.
    <dd> - Defines term definition

HTML Tables

  1. The HTML tables allow to arrange data like text, images, links, other tables, etc. into rows and columns of cells.
  2. The HTML tables are created using the <table> tag in which the <tr> tag is used to create table rows and <td>tag is used to create data cells.
  3. Here border is an attribute of <table> tag and it is used to put a border across all the cells. If you do not need a border then you can use border="0".You can also set border color also using bordercolor attribute.
  4. Table heading can be defined using <th> tag. This tag will be put to replace <td> tag, which is used to represent actual data cell.
  5. There are two attribiutes called cellpadding and cellspacing which you will use to adjust the white space in your table cells.
  6. cellpadding represents the distance between cell borders and the content within a cell.
  7. The cellspacing attribute defines the width of the border.
  8. You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.
  9. bgcolor attribute is used to set background color for whole table or just for one cell.
  10. background attribute is used to set background image for whole table or just for one cell.
  11. You can set a table width and height using width and height attrubutes.
  12. The caption tag will serve as a title or explanation for the table and it shows up at the top of the table.

HTML Images

  1. You can insert any image in your web page by using <img> tag.
  2. The simple syntax to use this tag is <img src="Image URL" ... attributes-list/>
  3. The src attribute is used to give the address of the image with extension.
  4. The alt attribute is a mandatory attribute which specifies an alternate text for an image, if the image cannot be displayed.
  5. You can set image width and height based on your requirement using width and height attributes.
  6. By default image will have a border around it, you can specify border thickness in terms of pixels/value using border attribute. A thickness of 0 means, no border around the picture.
  7. By default image will align at the left side of the page, but you can use align attribute to set it in the center or right.

HTML Background

  1. These are the attributes to change web page looking.
  2. Attributes are used inside a tag and it follows att_name="value" format. Ex : text="red"
  3. bgcolor attribute is used to change the background-color in a web page.
  4. text attribute is used to change the text color in a web page.
  5. background attribute is used to set an image as a background in a web page. Here we have to give the whole image url with extension.

HTML Comments

  1. Comment tags are used to insert comments in the HTML source code.
  2. You can add comments to your HTML source by using the following syntax:
    <!-- Write your comments here -->
<!-- Single line comment -->
    
  <!-- Multiline comment
   Here you can write any number of lines
  -->

HTML Formatting

  1. HTML also defines special elements for defining text with a special meaning.
  2. HTML uses elements like <b> and <i> for formatting output, like bold or italic text.
  3. Formatting elements were designed to display special types of text. 

                          <b> - Bold text - </b>
  <strong> - Important text  -  </strong>
  <i>      - Italic text     - </i>
  <em>     - Emphasized text - </em>
  <mark>   - Marked text     - </mark>
  <small>  - Small text      - </small>
  <del>    - Deleted text    - </del>
  <ins>    - Inserted text   - </ins>
  <sub>    - Subscript text  - </sub>
  <sup>    - Superscript text- </sup>

HTML Paragraphs

  1. HTML paragraph or HTML p tag is used to define a paragraph in a webpage.
  2. It is a notable point that a browser itself add an empty line before and after a paragraph.
  3. The HTML <p> element defines a paragraph.