Day 1 M Flashcards
How does Javascript makes thing interactive
By accessing and modifying the content of the page
How do javascript access content
To select any content from the HTML like h1 tags
How do javascript modify content
adding elements, attributes, and text to the page, or removing them
changing CSS after clicks,
What are program rules
rules which allow to access or change the
content of a page
A mortgage calculator could collect
values from a form, perform a
calculation, and display repayments.
Example of program rules
Pressing a button
Reacting to the event
Slide shows on a webpage
Having number of different images within same page in a sequence
Forms
Validating forms:
Alerting the user if they entered the wrong email or did a typo while entering the phone number
Reloading just the part of the page
Finding the part using tags and just reloding that section
Filtering data
Making filters like high to low, or pink color only on shopping websites
HTML elements
An element has opening, the content to display and the closing tag
< p>
Paragraph opening tag
< /h1>
Heading closing tag
CSS rules
Rules indicating how the HTML content should be displayed
.samosa {
background-color: yellow
}
Here .samosa is a selector
background-color is property name
yellow is property value