- HTML offers three ways for specifying lists of information. All lists must contain one or more list elements.
- <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 - <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. - <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
Material about computer programming languages like HTML, CSS, JavaScript, SQL, Java
Tuesday, 6 December 2016
HTML Lists
HTML Tables
- The HTML tables allow to arrange data like text, images, links, other tables, etc. into rows and columns of cells.
- 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.
- 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.
- 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.
- There are two attribiutes called cellpadding and cellspacing which you will use to adjust the white space in your table cells.
- cellpadding represents the distance between cell borders and the content within a cell.
- The cellspacing attribute defines the width of the border.
- 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.
- bgcolor attribute is used to set background color for whole table or just for one cell.
- background attribute is used to set background image for whole table or just for one cell.
- You can set a table width and height using width and height attrubutes.
- 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
- You can insert any image in your web page by using <img> tag.
- The simple syntax to use this tag is <img src="Image URL" ... attributes-list/>
- The src attribute is used to give the address of the image with extension.
- The alt attribute is a mandatory attribute which specifies an alternate text for an image, if the image cannot be displayed.
- You can set image width and height based on your requirement using width and height attributes.
- 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.
- 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
- These are the attributes to change web page looking.
- Attributes are used inside a tag and it follows att_name="value" format. Ex : text="red"
- bgcolor attribute is used to change the background-color in a web page.
- text attribute is used to change the text color in a web page.
- 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
- Comment tags are used to insert comments in the HTML source code.
- 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
- HTML also defines special elements for defining text with a special meaning.
- HTML uses elements like <b> and <i> for formatting output, like bold or italic text.
- 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
- HTML paragraph or HTML p tag is used to define a paragraph in a webpage.
- It is a notable point that a browser itself add an empty line before and after a paragraph.
- The HTML <p> element defines a paragraph.
Subscribe to:
Comments (Atom)