Podcast Beta
Questions and Answers
What does HTML stand for?
What is the main purpose of PHP?
What is CSS used for?
Web designing
HTML is case sensitive.
Signup and view all the answers
The method used to send visible input data from a form in PHP is called ___.
Signup and view all the answers
Match the following CSS selectors with their usage:
Signup and view all the answers
What is the purpose of the standard HTML structure?
Signup and view all the answers
To create a line break in HTML, use the ___ tag.
Signup and view all the answers
PHP code can be embedded within HTML.
Signup and view all the answers
What does the acronym CSS stand for?
Signup and view all the answers
What is the correct way to write a hyperlink in HTML?
Signup and view all the answers
In CSS, to set the font size, you would use 'font-size: ___;'
Signup and view all the answers
Which of the following is NOT a commonly used HTML tag?
Signup and view all the answers
Study Notes
Introduction to Computing Exam Study Notes
-
HTML (HyperText Markup Language)
- Standard markup language for creating web pages
- Created by Tim Berners Lee in 1993
- Not case-sensitive
-
PHP (PHP HyperText Preprocessor)
- Originally named "Personal Home Page"
- Scripting language that makes websites interactive
- Used for e-commerce applications
-
Methods for data requests:
- GET: Visible input
- POST: Non-visible input (e.g., passwords)
-
CSS (Cascading Style Sheets)
- Used for web design
- Defines presentation rules for HTML elements
Commonly Used HTML Tags
-
<h1>
to<h6>
: Heading tags (largest to smallest) -
<tr>
: Table row -
<img>
: Image (self-closing tag)- Attributes:
-
src
: Image source file -
alt
: Alternative text for accessibility
-
- Attributes:
-
<a>
: Anchor tag (for hyperlinks) -
<ul>
: Unordered list -
<ol>
: Ordered list -
<p>
: Paragraph -
<pre>
: Preformatted text - Empty Elements:
-
<br>
: Line break -
<hr>
: Horizontal line
-
Standard HTML Structure
-
<!DOCTYPE html>
: Document type declaration -
<html>
: Root element -
<head>
: Contains meta information (not displayed on page)-
<title>
: Page title
-
-
<body>
: Contains content displayed on page
Hyperlinks
-
<a href="URL">Link text</a>
: For linking to another page -
target="_blank"
: Opens link in a new window or tab
Headings
-
<h1>
: Largest heading -
<h6>
: Smallest heading
PHP Code structure
- PHP code is embedded within HTML using
<?php ?>
tags. - Example:
<!DOCTYPE html>
<html>
<head>
<title>PHP Example</title>
</head>
<body>
<?php
echo "Hello World!";
?>
</body>
</html>
CSS Selectors
-
Class selector:
.className
(e.g.,.myClass
) for styling multiple elements -
ID selector:
#idName
(e.g.,#myId
) for styling specific elements -
Universal selector:
*
(e.g.,* {font-weight: bold;}
for applying styles globally) -
Element selector:
elementName
(e.g.,h1 {}, p {}
) for applying styles to all elements of that type
Embedding CSS and PHP in HTML
-
CSS:
-
Inline: Styles applied directly to elements using the
style
attribute -
Internal: Styles defined within
<style>
tags in the<head>
-
External: Styles linked using the
<link>
tag and a separate.css
file
-
Inline: Styles applied directly to elements using the
-
PHP:
- PHP code is embedded within HTML
Tag, ID, and Class Differences
- Tag: Defines basic HTML element structure and content
-
ID: Used for specific elements, often with the
for
attribute in form labels. - Class: Used for multiple elements with common attributes, often for styling with CSS.
Changing Fonts and Font Styles
-
Use CSS properties:
-
font-family
: Sets the font family (e.g., "Arial", "Times New Roman", "sans-serif") -
font-size
: Sets the font size (e.g., "16px", "1em") -
font-weight
: Sets the font weight (e.g., "bold", "normal") -
font-style
: Sets the font style (e.g., "italic", "normal") -
background-color
: Sets background color (e.g., "pink", "#ff0000") -
text-align
: Aligns text (e.g., "center", "left")
-
HTML Tables, Form Inputs, and Attributes
-
Tables:
- Created with the
<table>
tag - Use
<tr>
for rows and<td>
for cells
- Created with the
-
Forms:
- Created with the
<form>
tag - Common input types:
-
<input type="text">
: Text input -
<input type="password">
: Password input -
<input type="radio">
: Radio button -
<input type="checkbox">
: Checkbox -
<textarea>
: Multi-line text input -
<select>
: Dropdown list
-
- Created with the
-
Attributes:
- Provide additional information about HTML elements
- Examples:
-
id
: Unique identifier for an element -
class
: Group elements with shared properties -
name
: Used to identify form data -
value
: Sets the initial value of an input field -
src
: Specifies the source of an image or script -
href
: Specifies the link for an anchor tag
-
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Prepare for your Introduction to Computing exam with these concise study notes covering HTML, PHP, and CSS. This quiz includes essential concepts, commonly used HTML tags, and basic scripting methods for web development. Ideal for any student aiming to enhance their understanding of web technologies.