Tuesday, 24 November 2015

CSS

CSS


Hello and welcome to my blog on CSS. I am going to explain what CSS is and then show how it is used within modern webpages.

CSS stands for "Cascading Style Sheet." Cascading style sheets are used to format the layout of Web Pages. They can be used to define text styles, table sizes, and other aspects of Web pages that previously could only be defined in a page's HTML code.

CSS helps Web developers create a uniform look across several pages of a Web site. Instead of defining the style of each table and each block of text within a page's HTML, commonly used styles need to be defined only once in a CSS document. Once the style is defined in cascading style sheet, it can be used by any page that references the CSS file.

Check out the image below showing a simple CSS:

Sample of CSS
CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.

HTML was NEVER intended to contain tags for formatting a web page. HTML was created to describe the content of a web page, like:
<h1>This is a heading</h1>
<p>This is a paragraph.</p>

When tags like <font>, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large websites, where fonts and color information were added to every single page, became a long and expensive process.
To solve this problem, the World Wide Web Consortium (W3C) created CSS. CSS was created to specify the document's style, not its content.
In HTML 4.0, and later, all formatting should be removed from the HTML page, and stored in separate CSS files.

The following is a section of code I prepared and below that is what it will look like due to the CSS code.

<!DOCTYPE html>
<html>
<head>
<style>
p{text-align: center;
    color: red;}
</style>
</head>
<body>
<p>Every paragraph will be affected by the style.</p>
<p id="para1">Me too!</p>
<p>And me!</p>
</body>
</html>

What the text will look like
Keep an eye out for my next post which will show you more complicated CSS formats and how they can benefit users of the internet.

HTML Code

HTML Code

Hello and welcome to my blog on HTML. I am going to introduce you to what HTML is and describe briefly how it works on webpages on the World Wide Web.  
 
HTML (Hypertext Markup Language) is the set of codes inserted in a file intended for display on a World Wide Web browser page. Every webpage you look at is written in a language called HTML. You can think of HTML as the skeleton that gives every webpage structure.
 
Below is an image of simple HTML Coding:

Simple HTML Code
 
As you can see from the image above:
  • All HTML documents must start with a type declaration: <!DOCTYPE html>
  • The HTML document itself begins with <html> and ends with </html>
  • The visible part of the HTML document is between <body> and </body>7
HTML Headings
Heading elements implement six levels of document headings, <h1> is the most important and <h6> is the least. A heading element briefly describes the topic of the section it introduces. HTML headings are defined with the <h1> to <h6> tags.

Below is an image showing different headings available:
Sample of Headings
 
HTML Paragraphs
The paragraph element breaks text into paragraphs. Any text that you surround with a <p> and a closing </p> becomes a separate block. HTML paragraphs are defined with the <p> tag.

Below is an image showing a paragraph:
Sample of a Paragraph
The three stages above show you basic rules on how to use HTML code in order to create a webpage. Check out my later blogs which demonstrate how to use more complex HTML techniques!