Possible Layouts
Or, how would you use these to create a standard web page. Here is one example using some of these standard elements: This example adds in multiple elements like headers and sections to demonstrate a more complex structure:
Read MoreSemantic Element List
Here are the main semantic elements: Element Description <article> for complete or self-contained items like a blog post, newspaper article or forum post
Read MoreAdvanced String Functions
Finding a word or characters within a String Strpos(): finds a string within a string. Returns the position of where the first string is in the second string – returns 0 if it is not there! Also, the first character in a string is position 0. Here’s the basic syntax: strpos(string, text) See this example.…
Read MoreUsing Strings in PHP
Before we get into some more advanced String functions – let’s take a more in depth look at how to mix HTML & PHP as well as reviewing how the echo statement works. Inserting Line Breaks There are several ways to insert HTML into PHP code. We are going to use doing line breaks as…
Read MoreHomework: Output in PHP
Playing With PHP Let’s try mixing our HTML and PHP together as well as playing with echo. See examples below. <p>Her name is: <?php echo $name; ?> </p> <?php echo “Her name is “, $name; ?> Create a file called second.php Store a name in a variable Store the person’s age in a variable Output…
Read MoreHomework: JavaScript Form Validation
Homework – Forms & JavaScript Validation Add some JavaScript to the form you created in form1.php. Make sure their first name is not Scum If there last name is longer then 30 characters – tell them it is invalid and must be entered again.
Read MoreHomework: HTML 5 Form Validation
Homework – Forms & HTML5 Add some HTML5 fields to the form you created in form1.php. Like this: Add one number field and set max and min constraints on it. Create one date or time field. Make at least one field required via HTML 5 Add a field for email and make it match a…
Read MoreHomework: Returning Values in JS
Getting Values Back From a Function Next let’s practice getting data back from a function with a series of functions that are all called from the main part of the program. Create a program called returning.html- we will use internal JavaScript on this one. Do one function at a time – add code to the…
Read MoreHomework: Passing Values Functions in JS
Passing Values to Functions Let’s practice passing data to functions with a series of functions that are all called from the main part of the program. Create a program called passing.html- we will use internal JavaScript on this one. Do one function at a time – add code to the main part if you need…
Read MoreExternal Scripts and Functions
Pulled from “How to Use JavaScript” …edit! Using the External Method Why? Because the code is easier to read and to maintain and can be used by multiple web pages. How? Simply link to an external file via a src attribute in the head section. Create your HTML file. Add this line into your <head>…
Read More