HTML - The Language of the Web
HTML(Hyper Text Markup Language) is the standard language use to create and structure content on the web. Why learn html: because we need to create website for that we need html, or because of content. Getting with HTML Tip: type - html:5 / ! - for boilerplate code Boilerplate Code <!DOCTYPE html> <!-- tells that we are using HTML5 --> <html lang="en"> <!--The tag represents the root of an HTML document.--> <head> <!-- head is a container for metadata (data about data)--> <meta charset="UTF-8"> <!--tag defines metadata about an HTML document--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <!--defines the title of the document.--> </head> <body> <!-- defines the document's body.--> <!-- content added here --> </body> </html> Tags in HTML <h1></h1> - heading tag and Most Importance <h2></h2> - less Importance than h1 <h3></h3> - less Importance than h2 <h4></h4> - less Importance than h3 <h5></h5> - less Importance than h4 <h6></h6> - less Importance than h5 <p></p> - paragraph tag used to add paragraph/text on website <b></b> - used to bold the text <i></i> - used to italic the text <sup></sup> - used for to add super script <sub></sub> - used to add sub script <br></br> - used to break line <hr> - used to add horizontal row <ol></ol> - used to add ordered list <ul></ul> - used to add unordered list <li></li> - used to add items in list <a href ="source"> </a> - used to make text clickable/hyperlink Tip: to open link in new tab use this target="_blank" <img src="source" alt=" "> - used to add image to website <form></form> - used to create the form <label></label> - used to add label to input field <input id ="abc" type="text" placeholder="Name" > - used to add input field <div></div> div is rectangle in his nature with 0 height div is used to combine multiple elements together in html <table></table> - A table in HTML consists of table cells inside rows and columns. <td></td> - Each table cell is defined by a and a tag <tr></tr> - table row starts with a and ends with a tag <th></th> - Defines a header cell in a table Input Types for Input tag text : <input type="text" placeholder="Name"> email : <input type="email" placeholder="Email"> password : <input type="password" placeholder="Password"> checkbox : <input type="checkbox" > radio button : <input type="radio" > Male file : <input type="file" > range : <input type="range" > color: <input type="color" > date : <input type="date" > submit : <input type="submit" > id: id is attribute that is used to assign id to an element. It is very helpful when we have multiple of same type but we need to treat them differently. id must be unique of element. ...