Posts

Showing posts from June, 2021

HTML5: HTML Tags

The tags introduced in HTML5 are more descriptive such as: main , header , footer , nav , video , article , section , audio & many more.  These tags helps with Search Engine Optimization (SEO) and accessibility. The main tag helps search engine and other developers find the main content of your page.  Adding an image to your page: Using img element by pointing it to a specific image's URL using the src attribute. This img tag is self-closing. The img tag must come with alt attribute to help screen readers especially when the image is failed to load (might be due to heavy load, internet connection and whatnots). alt attribute should contain a description of the image to help screen readers understand it. Link to external pages: Using a (anchor) element to link to any external pages The a tag contains href attribute which contains the destination page's URL The tag should also contain anchor text to allow clickable text which will direct user to the destination page &l

What to code?

Here's for a bunch of ideas:  https://what-to-code.com/?order=POPULAR

Web Worker | Multithreading in Javascript

 1. Connect Web Worker to SQL Database. Web worker does not allow default JQUERY to be used. Alternatives: There's another alternative such as fake DOM JQUERY & importScripts() method (but unfortunately, this alternate method doesn't work for me - there were still some errors) Use fetch method: fetch('process.php').then(res => res.text())    //convert the above data (from the url) into text                 .then(body =>{                     self.postMessage(body);                 }) 2. Print all data from SQL database: After you have successfully connected to the PHP file (read no.1), you can continue step 2 which is to print all the data from the database by using for loop.  // if result is not zero, display result  if($result-> rowCount() > 0){     for($i = 0; $i < $result->rowCount(); $i++){         $row = $result-> fetch(PDO::FETCH_ASSOC);         print_r(json_encode($row));         // echo $row["user_email"] .="\n";