INTRODUCTION TO HTML
What is HTML?
HTML stands for hyper text markup language and it describes the structure of a Web page. HTML elements are represented by tags and they tell the browser how to display the content.
Example
<!DOCTYPE html><html><head><title>Page Title</title></head><body><h1>This is a Heading</h1><p>This is a Paragraph.</p></body></html>
HTML Tags
HTML tags are element names surrounded by angle brackets.
<tagname>..........text.........</tagname>
Web Browsers
Web browsers are used to read HTML documents and display them like Chrome, Firefox, Safari.
How to create HTML Page?
- Open notepad.
- Write HTML code.
- Save the HTML Page with .html extension.
- View HTML Page in Web Browser.
HTML Documents
- HTML documents must start with <!DOCTYPE html> declaration. It begins with <html> and ends with </html> tags.The visible part of HTML is between <body> and </body>.
- The HTML <head> element contains metadata. Metadata is a data about the HTML document. It is placed between <html> tag and <body> tag.
- HTML headings can be defined with <h1> to <h6> tags. <h1> is used for the biggest heading while <h6> is used for the smallest heading. Example, <h1>Heading</h1> <h2>Subheading</h2> .
- <p> tag is used for HTML paragraphs. Example, <p>This is a paragraph.</p> .
- HTML Links are specified in <a>. href attribute is used to specify link's destination. Example, <a href="https://passableblog.blogspot.com">Link</a> .
- <img> tag is used to define HTML images. src attribute is used to specify the filename of image source and alt attribute is used as an altenative, if an image cannot be displayed. Example, <img src="img1.jpg" alt="img1.com" width="100" height="140">.
- <button> tag is used to define HTML buttons. Example, <button> Click me. </button>.
- HTML lists are defined with the <ul> (unordered/bullet list) or the <ol> (ordered/numbered list) tag, followed by <li> tags.
- <br> tag is used for linebreak.
- HTML is not case sensitive.
- The language of the document can be declared in the <html> tag with the lang attribute. Example, <html lang="en-US">.......</html>.
- Both double quotes and sinle quotes can be used around attributes.
- <hr> tag is used to separate content in an HTML page with a horizontal line.
- <div> and <span> are used to define a section in a document.
- <table> tag is used to define HTML table. Each table row is defined with the <tr> tag. A table header is defined with the <th> tag. A table data/cell is defined with the <td> tag.
- <pre> tag defines preformatted text i.e. text is displayed in a fixed-width font and it preserves both spaces and line breaks.
- Tags for formatting elements are:
FOR FURTHER LEARNING VISIT AND SUBSCRIBE YOU TUBE CHANNEL👇
It was an informative blog about HTML and I got a good knowledge about HTML thank you
ReplyDeleteThank you
DeleteReally good content coming forward.
DeleteThank you
Delete