Making a webpage with pure PHP
Making a page that uses only PHP is simple. It can include text, images, and styles just like HTML does. The difference is that PHP also allows for programming and database interaction, but for this tutorial we will only focus on creating a stylized page.
The main thing to remember is that anything following the "echo()" function will be printed to be interpreted as html text. This means we can include tags. For example, you can write the style tag simply with:
echo "";
It will be printed to be read just like it would in a .html file!
Same will go for inserting an image:
echo "";
And of course, the same applies for inserting plain text, or even in paragraph or custom div tags:
echo "Text
";
Making a webpage with Angular
Angular works by using templates and implementing them when called on. You can easily call on a simple store template by calling on those functions:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
}
Try this in the app.componenent.ts directory, or on stackblitz.com for a quick demonstration!