Complete HTML Notes 1681809769
Complete HTML Notes 1681809769
HTML IMPORTANT
NOTES
QUICK AND EASY TO REMEMBER NOTES
Sold to
[email protected]
HTML NOTES - HTML DOCUMENT STRUCTURE
DEVELOPER UPDATES 01
HTML NOTES - BASIC HTML PAGE TAGS
Tag Description
*Note: In HTML every tag must have an end tag, For Example, if you are inserting a
paragraph with <p> it should have an end tag </p>, There are some exception tags that
don't have an end tag like <!DOCTYPE html>, <br>.
DEVELOPER UPDATES 02
HTML NOTES - HTML TEXT FORMATTING
<cite> To insert title of creative work like images, audio, video, etc.
DEVELOPER UPDATES 03
HTML NOTES - HTML TEXT FORMATTING
DEVELOPER UPDATES 04
HTML NOTES - HTML TEXT FORMATTING
Output
Tag Description
DEVELOPER UPDATES 05
HTML NOTES - HTML TABLE
Table Example
Output:
DEVELOPER UPDATES 06
HTML NOTES - HTML IMAGES
HTML Images
Images make websites beautiful and easy to process information. To add
images to HTML pages <img> tag is used, img tag has the following
important attributes that are needed to format an image.
Output:
DEVELOPER UPDATES 07
HTML NOTES - HTML LINKS
HTML Links
HTML links are a powerful way to allow seamless navigation of pages on
your website. When a user clicks on the link, the browser automatically
follows it and loads the link URL.
To insert the links in the webpage we have to use the <a> tag. Following
are the important attributes that are required to insert the links.
download Used to specify the target file if you want to add download file
feature
DEVELOPER UPDATES 08
HTML NOTES - HTML LISTS
HTML Lists
Using HTML it's possible to display information in a list. This makes it easier
to understand the data. HTML provides 3 ways to specify the information.
In above example <li> is used to insert a list item, <dt> means data
term(key) and <dd> data description(value).
DEVELOPER UPDATES 09
HTML NOTES - HTML LISTS
DEVELOPER UPDATES 10
HTML NOTES - HTML FORM
HTML Forms
Suppose your client or boss told you to design a webpage that takes input
from the user. In that scenario, you will need to add a form to the
webpage.
To add the form to the webpage we have to use the <form> element.
Following are the attributes used for the form tag.
Attributes Description
enctype Used to define how browser should encode the data before
sending it to the server, Values for this attributes are:
application/x-www-form-urlencoded: The default value.
multipart/form-data: If form contains input type file then
this tag is used
text/plain: Introduced in HTML5 for debugging.
DEVELOPER UPDATES 11
HTML NOTES - HTML FORM
Text Fields
Type Description
<textarea> Used to define multiple line text field to accept the data like
user address and description of the product
DEVELOPER UPDATES 12
HTML NOTES - HTML FORM
Output:
DEVELOPER UPDATES 13
HTML NOTES - HTML FORM
Buttons
If you want to add buttons in the form like Submit, Save, Update and
Cancel, You will need to use <button> tag to add the button in the form.
Button Attributes
Attribute Description
type Type of the button, Value for this attribute will be button
Checkbox
If you want to add feature of the selecting the multiple options like your
favourite subjects, your favourite food, place would you like to travel then
checkbox field is used in the form. For grouping checkbox there should be
same name for all checkbox.
Checkbox Attributes
Attribute Description
type Used to set type of the input, its value will be checkbox
value To set the value of the checkbox, Like if you are adding field to
choose your favourite food the value will be food name
DEVELOPER UPDATES 14
HTML NOTES - HTML FORM
Radio Button
If you want to give the option to select only one field from the multiple
options available to the user then the radio button is used.
For example, there will be multiple genders but we allow users to select
only one gender. For grouping radio buttons there should be same name
for all checkbox.
Radio Button Attributes
Attribute Description
type Used to set type of the input, its value will be radio
checked To set if the radio button is checked or not, If you add this
attribute in the element radio button will be selected by
default
For example, suppose you want to add a list of the cities to select user city,
then you will choose select form control instead of radio buttons.
DEVELOPER UPDATES 15
HTML NOTES - HTML FORM
File Input
If you want to add file upload feature then file input is used, For example
suppose you have to add the feature of setting profile pic of the user then you
will have to use file input type.
Hidden Inputs
If you want to add/set the value in the form that can be used later or can be
sent to the server without showing it to the user at that time hidden fields are
used.
For example, You will need a user id for front-end operation but you don't
have to show the user id to the user then you will have to use a hidden input
field.
Form Labels
In the above form example, we set the input field name in plain text format,
like name, and password, But there is a better option to set a label for the
input field in the form.
We can use <label> to set a label for the input field, So when users click on the
label the form field automatically gets selected. and we can format that label
text. For this feature we will have to set "for" attribute in the label and it
should match with input field id.
DEVELOPER UPDATES 16
HTML NOTES - HTML FORM
DEVELOPER UPDATES 17
HTML NOTES - HTML5 NEW INPUT ELEMENTS
number Used to add number field that accepts integer and number
DEVELOPER UPDATES 18
HTML NOTES - HTML5 NEW INPUT ELEMENTS
Output
Comment in HTML
To comment the code in html the following syntax is used.
DEVELOPER UPDATES 19
HTML NOTES - HTML LAYOUT
HTML Layout
In the above examples, we created HTML pages without structuring pages
well. To make a good website experience for the user HTML provides elements
to design an HTML layout to make a website look awesome.
In the very first we have seen the structure of the HTML webpage, Here we will
go through all tags with example
Tag Description
<div> This is most used tag for designing HTML pages, This is
container for HTML elements. Using div we can divide the
HTML pages into different blocks and add style to each div.
<aside> The HTML aside tag identifies content that is not essential to
the page and should be displayed in a separate box or beside
the main content.
<hr> This tag is used to add horizontal line between two elements
DEVELOPER UPDATES 20
HTML NOTES - HTML LAYOUT EXAMPLE
DEVELOPER UPDATES 21
HTML NOTES - VIDEO IN HTML PAGE
The control attributes add video controls like play, pause, and volume. width
and height are used to define video width and height. source allows us to
specify video files we can add alternative files using this tag.
To add the autoplay feature, add the "autoplay" attribute in the audio tag.
DEVELOPER UPDATES 22
HTML NOTES - AUDIO IN HTML PAGE
The control attributes add audio controls like play, pause, and volume. source
allows us to specify audio files we can add alternative files using this tag.
To add the autoplay feature, add the "autoplay" attribute in the audio tag.
DEVELOPER UPDATES 23
HTML NOTES - ADDING CSS TO HTML
CSS helps you make changes to the appearance of elements within a web
page such as the text, fonts, colors, images, and spacing. You can also create
and add custom fonts.
There are 3 ways given below to add CSS to the HTML page:
Way Description
Internal To add CSS in HTML page in the head section using <style> tag
DEVELOPER UPDATES 24
HTML NOTES - ADDING CSS TO HTML
DEVELOPER UPDATES 25
Thank You!
@richwebdeveloper
@new_javascript
@developerupdates
www.developerupdates.com @developerupdates