This document provides an overview of common HTML tags and their uses:
- It describes various block-level tags like <p>, <div>, <header>, <footer>, and <table> as well as inline tags like <span> and <a>.
- Formatting tags like <b>, <i>, and semantic tags like <main>, <nav>, and <article> are also covered.
- The document outlines different types of form inputs like textboxes, checkboxes, radio buttons, selects, textareas and their attributes.
- Other tags covered include headings, lists, images, breaks and horizontal rules. The document provides a basic cheat sheet for common HTML elements and their purposes.
This document provides an overview of common HTML tags and their uses:
- It describes various block-level tags like <p>, <div>, <header>, <footer>, and <table> as well as inline tags like <span> and <a>.
- Formatting tags like <b>, <i>, and semantic tags like <main>, <nav>, and <article> are also covered.
- The document outlines different types of form inputs like textboxes, checkboxes, radio buttons, selects, textareas and their attributes.
- Other tags covered include headings, lists, images, breaks and horizontal rules. The document provides a basic cheat sheet for common HTML elements and their purposes.
This document provides an overview of common HTML tags and their uses:
- It describes various block-level tags like <p>, <div>, <header>, <footer>, and <table> as well as inline tags like <span> and <a>.
- Formatting tags like <b>, <i>, and semantic tags like <main>, <nav>, and <article> are also covered.
- The document outlines different types of form inputs like textboxes, checkboxes, radio buttons, selects, textareas and their attributes.
- Other tags covered include headings, lists, images, breaks and horizontal rules. The document provides a basic cheat sheet for common HTML elements and their purposes.
<p></p> :- paragraph element, creates a block element <h1>_ _ _<h6> :- heading tag used to give heading <!DOCTYPE>:- specifies the document type to be html <html></html>:- specifies the document to be of html type <head> </head>:- specifies things that relate to the page <title> </title> :- It gives the name to be displayed on the title bar <body> </body>:- All the things that is displayed on the page comes here <ol></ol>:- ordered list <ul></ul>:-unordered list <li></li>:- list item Under ol or ul only li,script and template item can come <a></a>:- anchor tag used to create hyperlink <img>:- to add image, it has 2 main attributes 1. Src :- source attribute defines the location of the image 2. Alt:- it gives text if image isn’t loaded also it gives screen reader wordings to say whenever it encounters image <div></div>:- Used to create block elements used for styling in CSS whenever we need different elements to style together <span></span>:- Used for creating inline styling in the CSS <br>:- break line element <hr>:- horizontal rule element <sub></sub>:- used to create subscript <sup></sup>:- used to create superscript Entity codes:- These are the special code reserved for some special characters like < > & with more Semantic Elements:- Helps us to shape the web page 1. <main></main>:- main content of page 2. <nav></nav>:- used on navigation link 3. <section></section>:- used on section of content 4. <article></article>:- used on article content 5. <aside></aside>:- used on contents that appear on side 6. <header></header>:- used to create a header, can also be used in other elements like article 7. <footer></footer>:- used to create a footer, same as ab.. 8. <time></time>:-used with attribute datetime to give format, it is used when content contains date and time 9. <figure></figure>:- it is used around the image tag and contains attribute figurecaption to give a caption <table></table>:- Use to create a tabular data in html <th></th>:- Table heading <tr></tr>:- Table row <td></td>:- Table data <thead></thead>:- used to create header section of table <tbody></tbody>:- used to create main section of table <tfoot></tfoot>:- used to create footer section of table Colspan attribute:- Used to stretch a cell across colemns Rowspan attribute:- Used to stretch a cell across rows <form></form>: Used to create a form Action attribute: Gives us the location where we need to send our http request for the website <input>: used inside form element to create a box where we can type our inputs Type attribute: Defines the type of input that input elements takes. There are about 20 types of values. Can be accessed on https://developer.mozilla.org/enUS/docs/Web/HTML/Eleme nt/input <label></label>: used to link input and text for which the input is For attribute is used in label and id element is used in input element to link them, both of them should contain the same name . <button></button>: Used to create a button Type attribute defines the type of button it should be Eg type=”Buttons” will give us a regular button Type=”Submit” will create a submit button Name attribute of input type assigns a name to the input type which is then send to the request. Checkboxes Input type=”Checkbox”, it can select multiple options, information send in the browser , checked to describe default checked box Radiobuttons Input type=”radio”, it can select only one option out of many and to group them into one field we set name same for all the fields value attribute is used to give the value that is passed after submitting the form <Select></select>: used to give a dropdown box <option>:used to give option in dropdown box, value attribute is same as radio buttons. Range Input type=”range” used to give us a slider, max and min attributes can be selected to give us the maximum and minimum amount Step attribute can be used to give us the count by which it should increment <textarea> used to give multiline input, used rows and cols can be used to give the initial lines to the system. Required attribute makes it mandatory to fill the input Maxlength minlength is used for text Max min is used for numbers Pattern attribute is used to fix a pattern i.e a certain pattern should be followed