Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Combining HTML, CSS, JavaScript

Web-Pro Games
14th May 2024

Access and use library of CSS styles provided by W3 School.


Combining HTML, CSS, and JavaScript:
 Many online users today expect websites to be interactive. Users can use interactive websites to
look up for information, send information to other organisations and perform other tasks such as
play of games.

Why combine HTML, CSS and JavaScript in websites and development:


1. HTML defines the content and structure of a webpage.
2. CSS defines how the content is presented or style for webpage content.
3. JavaScript defines how the user can interact with that content.

HTML and CSS


 HTML stands for Hyper Text Markup Language.
 HTML is a text-based approach used to describe how the content contained within an HTML file
is structured.
 Hypertext refers to a word, phrase or chunk of text that can be linked to another document or
text.
 Hypertext covers both textual hyperlinks and graphical ones.
 Without hypertext, it will be impossible to follow a link on a topic to a related article on that topic
or navigate the web.
 Markup language is a text-encoding system which specifies the structure and formatting of a
document and potentially the relationship between its parts.
 Markup is often used to control the display of the document or to enrich its content to facilitate
automated processing.
 Markup tells the web-browser how it should display text, images, and other forms of multimedia
(video, audio etc.) on a webpage.
 HTML uses tags and attributes to define and describe the structure and content of a web page.
 Tags are used to define the beginning and end of a particular element, such as a heading,
paragraph, or image.
 Attributes are used to provide additional information about an element, such as the size of an
image or the alignment of a paragraph.

Steps to create a basic HTML document:


<html>
<head>
<title>This is the document title</title>
</head>
<body>
<h1> This is a heading</h1>
<p>The document description goes here...</p>
</body>
</html>

Commonly used HTML tags and their functions

Cascading Style Sheets (CSS)


What is CSS?
 CSS stands for Cascading Style Sheets.
 CSS is the language we use to style a web page. It describes how HTML elements are to be
displayed on screen, paper, or in other media. It can control the layout of multiple web pages all
at once.

Why use CSS?


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

CSS syntax
 A CSS rule consists of a selector and a declaration block.
 Selector: points to the HTML element you want to style.
 Declaration: block contains one or more declarations separated by semicolons. Each declaration
includes a CSS property name and a value, separated by a colon.
 Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded
by curly braces.

You might also like