Web Design 6 10
Web Design 6 10
Hyperlinks
hyperlink target attribute
The target attribute specifies where to open the linked document.
img attribute
Use the <img> element (inside <a> to use an image as link. EXAMPLE:
EXAMPLE: <a href="https://www.w3schools.com" target="_blank"> This is a
<a href="https://www.w3schools.com" img="google.com"> This is a link </a>
link </a>
LESSON 7
html form
form
Created as a means of making web pages interactive, allowing users to enter requested information to be submitted for processing.
FORM TAG VALUE OF TYPE ATTRIBUTE
<FORM> </FORM>
text
Attributes ACTION URL ADDRESS create a single line text input box
METHOD GET, POST password
same as text but the input text is masked for security reason.
INPUT TAG checkbox
<INPUT> create a checkbox.
radio
Attributes NAME URL ADDRESS creates a list of alternatives on which only one can be selected.
TYPE THE METHOD USED submit
SIZE ANY NUMBER create a button that submit a form when click.
VALUE ANY TEXT STRING reset
CHECKED NONE create a button that clears the whole form.
SELECT TAG OPTION TAG TEXTAREA TAG
<SELECT> </SELECT> <SELECT> </SELECT> <TEXTAREA> </TEXTAREA>
definition USED TO DEFINE DROPDOWN definition USED INSIDE THE SELECT TAG definition CREATES A MULTI-LINED
LIST TO SPECIFY ITEMS ON THE TEXT INPUT BOX.
DROPDOWN LIST
attributes NAME ANY TEXT OR STRING attributes VALUE ANY TEXT OR STRING attributes NAME ROW
SIZE ANY NUMBER SELECTED NONE COLUMN WRAP
LESSON 8
creating stylesheets
CSS (Cascading Style Sheets)
CSS describes how HTML elements are to be displayed on screen, paper, or in other media.
</style> h1 {
</head> color: blue;
<body> }
<h1> This is heading. </h1> p{
<p> This is paragraph.</p> color: red;
}
</body>
</html>
LESSON 9
styling with CSS
text properties example (internal css):
<!DOCTYPE html>
COLOR <html>
defines the text color to be used <head>
example (inline css): <style>
<h1 style="color:blue;"> This is heading. </h1>
<p style="color:red;"> This is paragraph.</p> h1 {
color: blue;
font-family font-family: verdana;
defines the font to be used font-size: 300%
example (inline css): }
<h1 style="font-family:verdana;"> This is heading. </h1>
<p style="font-family:courier;> This is paragraph.</p> p{
color: red;
font-size font-family: courier;
defines the text size to be used font-size: 160%
example (inline css): }
<h1 style="font-size:300%;"> This is heading. </h1>
<p style="font-size:160%;> This is paragraph.</p> </style>
</head>
text-align <body>
defines the text color to be used
example (inline css): <h1> This is heading. </h1>
<h1 style="text-align:center;"> Centered heading </h1> <p> This is paragraph.</p>
<p style="text-align:center;> Centered paragraph</p>
</body>
</html>
table properties
border example (internal css):
defines a border around an HTML element p {
border: 1px solid powder blue; }
padding example (internal css):
defines a padding (space) between the text and the border. p {
border: 1px solid powder blue;
padding: 30px; }
margin example (internal css):
defines a margin (space) outside the border. p {
border: 1px solid powder blue;
margin: 50px; }
LESSON 10
selectors, div, span and link
css selectors class selectors
Used to "find" (or select) the HTML elements you want to style. The class selector selects HTML elements with a specific class
attribute.