Professional Documents
Culture Documents
html forms:
it is used to collect input data from user and that data will be submitted/sent to
the server application for further processing.
<form>
</form>
request.getParameter("city")
2. Internal styles:
we use "<style>" tag in the head section of the html file.
This style is applied to the elements in the html file where it is written.
3. External styles
we use a separate .css file. this can be applied to any html file elements by using
"<link>" tag.
CSS selectors:
1. Element selector:
We specify the element for which CSS is being written.
3. class selector: we specify the class of elements to which CSS should be applied.
em
browser text size: 16px
1em: normal: 16px
descendents
child
width=100px+20px+20px=140px
margin:auto:horizontally center
overflow: visible,hidden,scroll,auto
display css:
none,inline,block,inline-block,
table: element will be like a table
JS access the html element content bu using HTML DOM(Document object Model)
DOM: when an html page is loaded on the browser it create a DOM of that page in the
memory as a tree structure
JS has the ability to access and modify the content of DOM tree.
innerText="<h3>Simant</h3>";
output: <h3>Simant</h3>
innerHTML="<h3>Simant</h3>";
output: Simant will be diplayed in h3
focus event:
onfocus(): event is fired when the mouse is clicked on the element(element gets the
focus).
onblur(): event is fired when focus is shifted away from the html element.