Podcast
Questions and Answers
What does HTML stand for?
What does HTML stand for?
- HyperText Multiple Language
- HyperText Markup Language (correct)
- Hyper Transfer Markup Language
- HighText Markup Language
What is the main purpose of PHP?
What is the main purpose of PHP?
- Creating static HTML pages
- Making websites interactive (correct)
- Styling web pages
- Building databases
What is CSS used for?
What is CSS used for?
Web designing
HTML is case sensitive.
HTML is case sensitive.
The method used to send visible input data from a form in PHP is called ___.
The method used to send visible input data from a form in PHP is called ___.
Match the following CSS selectors with their usage:
Match the following CSS selectors with their usage:
What is the purpose of the standard HTML structure?
What is the purpose of the standard HTML structure?
To create a line break in HTML, use the ___ tag.
To create a line break in HTML, use the ___ tag.
PHP code can be embedded within HTML.
PHP code can be embedded within HTML.
What does the acronym CSS stand for?
What does the acronym CSS stand for?
What is the correct way to write a hyperlink in HTML?
What is the correct way to write a hyperlink in HTML?
In CSS, to set the font size, you would use 'font-size: ___;'
In CSS, to set the font size, you would use 'font-size: ___;'
Which of the following is NOT a commonly used HTML tag?
Which of the following is NOT a commonly used HTML tag?
Flashcards are hidden until you start studying
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 filealt
: 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 pagetarget="_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 elementclass
: Group elements with shared propertiesname
: Used to identify form datavalue
: Sets the initial value of an input fieldsrc
: Specifies the source of an image or scripthref
: Specifies the link for an anchor tag
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.