Learn PHP by building a web site from scratch.
Part II: Adding CSS and a Standard Layout.
In this chapter we will:
In your web folder (DemoPHP), create a new CSS file named "Site.css".
Put the following code inside the CSS file:
The CSS file above defines the styles to be used used for
In your web folder (DemoPHP), create a new PHP file named "Footer.php".
Put the following code inside the file:
In your "DemoPHP" folder, edit the file named "Index.php".
Change the content to the following:
The home page above, is a copy of the home page from the previous chapter, with an added link to a style sheet (marked red), and an included footer.
You have created your first PHP site, with a main page (Index.php), a common footer for all your pages (Footer.php), and a common style sheet (Site.css).
In the next chapters of this tutorial, we will add a database to the web site. And finally we will add navigation.
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.