top of page

How to Build a Website - Part 1: Introduction

A website consists of far more than what you see in the browser, or even the inspection pane. A website is a conglomerate of assorted programming languages, each with a different function, helping to deliver the site and its features to you.. HTML is the basic display mechanism. You are looking at an HTML display when you look at a website. CSS is the styling language. It makes the HTML elements come alive and adds the layout and coloration effects that make a website attractive. JavaScript, or JS, is the interactivity language. It forms the foundation for most interactive features of a website. PHP is the master control language. It is server code that handles form data, returns database items to HTML and JavaScript, and adds to databases. All these languages are essential parts of making a website work.

__INTRODUCTION – HTML__

HTML stands for HyperText Markup Language. It displays content on the page and can be added to by JavaScript and PHP. HTML consists of tags, such as <p></p>, which represents a paragraph, or basic text area. Most tags need to be closed, signaled by a repeat of the start tag, but with a slash before the tag name: <p></p>. Some tags, however, like <meta> and <input> are 'self-closing'; they must not have a closing tag. Tags can be nested within each other, such as a heading in a button: <button><h1>A Button</h1></button>.

Tags define everything from text to input to links. Attributes are listed after the initial tag name, but within the closing '>': <input type="text">. Attributes are tag-specific and thus vary depending on which tag they are added to. An important attribute is the class. It is used to apply groups of CSS properties to an element. The id attribute is also very important, as it identifies the element in CSS and JavaScript. HTML is pretty straightforward, as is CSS. The hard ones are PHP and JavaScript.

__INTRODUCTION – CSS__

CSS is a Cascading Style Sheet. It applies effects in three ways: the class, the id, and the tag. The CSS class is a group of properties that are given an identifier to be used in an HTML class attribute. it is signaled by a dot:

.class{

font-family: Edo SZ;

color: darkolivegreen;

}.

Notice the syntax; CSS is based on a property: value syntax. The properties applied are signaled by braces {}. The id method selects one element by its id attribute and applies effects to that element. the id is signaled by a number sign:

background-color: blue;

color: yellow;

}.

Notice further that CSS requires a semicolon after each property line.

The tag method is used to apply effects to all HTML elements of a particular tag type. It requires no introductory character:

button {

color: black;

}.

CSS is arguably the easiest language to understand.


JavaScript and PHP will be introduced in the next post.


__RESOURCES__

http://www.minecaptain.com—This isn't really a resource, but it is one of the only places to contact me.

A blank HTML starter file— will be linked to in every post.


Well, that's all for now!

me = password hasher

26 views1 comment

Recent Posts

See All

1 則留言


ajschaub12.6
ajschaub12.6
2021年2月05日

I used to write some pages with just HTML and CSS. JS I tried... until I ran into OOP and that made my brain fall apart. It was fun while it lasted!


Also for those interested in building a website, there is this thing called a 'code editor'. These (depending on their features) will make code writing easier by catching syntax mistakes and other issues. If you want a simple one that doesn't have so many features, I recommend Scite. Another more complex editor (which I prefer because it has those issue-finding helps) is Microsoft Visual Studio Code. This one lets you select the language that you are programming in and once you do that it will catch the mistakes…

按讚
Post: Blog2_Post
bottom of page