Docsity

HTML Complete Handwritten Notes – Basic to Advanced Web Development, Study notes of Web Application Development

Partial preview of the text

Download HTML Complete Handwritten Notes – Basic to Advanced Web Development and more Study notes Web Application Development in PDF only on Docsity!

VVVVVYVVVUBUYVUYVUYUYUUUUUUUUUTUTY Date: = ma 16 : ana = | From Beginners to Advanced ee - a ll HTML 7 Beginner’s to Advanced ea NOTE 3° OD = es J zi * [Topics Covered | 66 4. Introduction to HTML The best way 2. Basic HTML Structure to learn HTML is 3. Headings & Paragraphs bu writing it. 4. Text Formatting J J 99 5. Links & Images 6. Lists in HTML What you'll learn: %. Tables : . 8. Forms in HTML Build strong Eat ; a Semahtta BoM Create responsive websites : a ee MI Understand modern HTMLS Se eee eee MI Real-world projects al ae pears M Go from Beginner to Advanced 12, Audio & Video 13. Iframes : 14. Meta Tags 15, Project Practice _ 16, Tips & Best Practices Code. Practice. Learn. Repeat. Contents | HTML foundations Text elements Links and images Lists and tables Forms Media Semantic HTML Metadata Accessibility Special elements Mini project Revision Page 5A aps How HTML Works HTML file We write HTML code in a plain text file using a text editor (like Notepad, VS Code, etc.). This file contains HTML tags and content that describe the Structure of a web page. ehtml file extension After writing the code, we Soave the file with a .htm! extension. For example : index. html The -htm! extension tells the computer thet this file is an HTML document. Web browser We open the .html file in a web browser Such as Google Chrome, Mozilla Firefox, Microsoft Edge , etc. The browser is a Software application thot can read and display web pages. Browser rendering process JH When the browser opens the HTML file, it goes through the Following simple steps: The browser reads the HTML file. It reads the HTML tags and understands their meaning. The browser interprets the tags and arranges the content. It applies default styles (and CSS, if linked). Finally , it displays the content on the Screen as a web page. Web page The result of the rendering process is Shown to us as a web page. This is what we See in the browser. Overall Flow Page 4 QBOGO Creating the First HTML File Let's create our very first HTML file and view it in a browser. @ Creating index. html * Open any text editor (Notepad, VS Code, etc.). Example: Filename : . Type a simple HTML code. + We will name the file as index.html. index.html re ening the file in a browser cave wit « Save the file on your computer. html oS * Open the file in any web browser (Chrome, Edge, Firefox, ete.). * You should see your webpage. @) Saving changes * Go back to the text editor. * Make any change in the HTML code. Save tre file (Gtr! S)s () Refreshing the page * Go back to the browser. + Refresh the page to see the changes. * You can press F5 or click the refresh button in the browser. Step Flow : [ Create | — [ Save | — | Open |> | Refresh | lie Understanding the Main Structure 1. | Role of DOCTYPE © The DOCTYPE declaration tells the browser which version of HTML the document is written in. It helps the browser display the page correctly. Example : 2. |Role of © The section contains information about the document that is not displayed on the page. It usually includes , <meta> tags, links to stylesheets , and other settings. Example: <head> < title >My Page 3. |Role of e The < body > section contains all the content that is visible on the web page, such as text, images , links, tables, etc. Example: | visible content 4. | Opening and closing tags e Most HTML elements have an opening tag and a closing tag. The content goes between these tags. © The closing tag is the same as the opening tag, but it has a forward slash (/) before the tag name. Example: |

This is a paragraph.

Page t Tags, Elements and Attributes What is a tag? ° A tag is a keyword written inside angle brackets <>. It tells the browser what to do. Example: (opening tag) and (closing tag) What is an element ? ° An element is the complete part of HTML from the opening tag to the closing tag, including the content in between. Example: Visit What is an attribute? ° An attribute provides extra information about an element. It is written inside the opening tag. Example: href is an attribute in the tag. Basic attribute syntax e Attributes are written as: name="value” Example: Visit i: ~ ttribut 2. y ag attribute content closing ta (a) (href) (text) oe J Value: “https ://example com” ¢ Tag: and e Element: Visit ¢ Attribute: href = “https://example.com” Page 8 Comments in HTML Comments are notes that we add in HTML code to explain our Code. They are not shown in the browser. ak Comment syntax In HTML, comments ore written using the follousing Syntax : < |-- This is a Comment --> a. Single- line comments ® Used to write a short note in a sngle line. ° The browser ignores everything inside the Comment. Example: will be ignored. Example: <== “This is a multi-line comment. It can span across several lines. The browser will not display it. --> 4, Why comments are useful ¢ They help us add notes and explanations in our code. * They make the code easier to read and understand. ° They help in organizing the code. ° They are useful when working on projects with others. Page 10 AML Headings HTML headings are used to define the titles or Subtitles in a webpage. 1. to © UTML provides Six levels of headings from (highest) to (lowest). | 2. Heading Hievarchy ° Headings follow a hierarchy . is the most important and
is the least important. 3. Correct Heading Order | e Use headings in a Logical order. * Do not skip levels. For example, use

after ,

after

, and so m. 4. Example (Code) 5. Example Output

This is Heading 1

This is Heading 1

This : Heading 2

This is Heading 2

This is Heading 3

a ee

This is Heading 4 We bay

This is Heading 5
eB lela
This is Heading 6 This is Heading 5 This is Heading 6 6. Note e d is the highest level heading . is the lowest Level heading . ala Line Break and Horizontal Rule In HTML, we can break. a line or add a horizontal line to Separate content using simple tags. &
(Line Break) e The
tag is used to bveek a line. e It is an em Tt moves the content +o Example: element. Tt does not heave a closing tag. the next line. This is fist line.
This is second line. *
(Horizontal Rule) © The
tag is used to insert a horizontal vyule. « It is an em element. It does not have a closing tag. « It is often used to Sepayate Sections or topics . Example: This is above the line.
This is below the line. HTML Code (Example) Output (In Browser) 4. Line Break Example: This is fivst line.
This is Second line. 2. Horizontal Rule Example : This is above the line.
This is below the line. ies 4. Line Break Example: This is fivst line. This is second line. 2. Horizontal Rule Example : This is above the line. This is below the line. Basic Text Formatting OSE ee eee ae HTML provides some basic tags Pon fevmate tex it look different. and make i) (Bold Text ) —> The tog ts used to make text bold. > It is used to show importance. Example : This is bold text. Output : This is bold text. ae <> (Italic Text) = he tag is used to moke text italic. —> It is used to vepresent alternate text or em phasis : EPIPE* 215 tiis ix Halle teat. The tag is used to underline text. > It is often used -for links. Example : ma This is underlined text. Output : This is underlined text. 14 More Formatting Elements 4, ¢ The tag is used to highlight text that is important or needs attention. Example:

Please read this notice Carefully.

Output: Please |read this notice carefully. 2. * The tag is used to make the text smaller than the normal text. Example:

This is normal text and this is smaller text .

Output: This is normal text and this is smaller text. 3. ° The tag is used to represent deleted text. Example:

The old price is Rs. 500 Rs. 350.

Output : The old price is Rs—5ee- Rs. 350. 4. - The tag is used to represent inserted text. Example:

Please pay Rs. 350 within 7 days .

Output: Please pay Rs. 350 within 7 days : 16 Subs coupt and. Supers Oupt Tn HTML, we can Show text a little below the. Normal Line (gubsentpt) on a I'Hle above the Yornmol Line (supexsesipt). Ge le Subscxipt The tag is used to display text ag Subscxipt . The Substsdpt text appears half a chanacter below the noxmel line. Syntax : | Subsexipt text tag is used to display text as Superscript, The Superscript text appears holf a chanacter above Ye noxmol Line. Syntax ‘ |< sup Superscript text < / sup? Example ( Mathernatteal Power.) : HTML Code Output 7 | aos 6° A< Sup) 2 > The
tag is used to define contact information for the auther/owner of a document or an article. > The content inside
ts usually displayed tn alice by the browser. > It can contain name, email, phone number, address , dinks , ete. 2) > The tag is used to define an abbveviation or acronym. > Use the title attribute to provide the full form or description of the abbreviation. > Browsers show the titl as a tooltip when we hover over the abbreviation. * The title Attribute The title attribute provides extra information about an element. In case of , it shows the full fem of the abbreviation . * Example ( Contact Information ) < address> Rahul Sharma
24, Green Park
New Delhi — 110016
Email: wows. example.. com
Member of HTML < /abbr > Community
49 Computer Code Elements HTML provides special elements to represent code , program output , key board input and variables. () - Defines a piece of computer code. Example: Use the print() function. a) % pre> - Defines preformatted text. Example:
 for i in range (1, 4): print (i) 
@® - Defines key board input. Example : Press Ctrl + S to p. Save. ® < samp> - Defines sample output from a program. Example : File Saved Successfully. ©) - Defines a variable in programming or in a mathematical expression. Example: The area of a circle is given by A = I x re/var)?. 20