HTML and CSS Flashcards
What is HTML?
A format that tells a computer how to display a web page. The documents themselves are
plain text files with special “tags” or codes that a web browser uses to interpret and display
information on your computer screen.
What does HTML stand for ?
Hyper Text Markup Language
What should a HTML file have ?
A HTML file extension
What is <!DOCTYPE…>
This tag defines the document type and HTML version.
<html>
</html>
This tag encloses the completeHTML document and mainly comprises of documents header which is represented by <head> … </head> and document body which is represented by <body > … /< /body> tags.
Goes at start and end of page
<head>
</head>
Tag that Represents document header, which can keep <title> <link></link> etc.</title>
<title>
</title>
Tag that is used inside <head> tag , to mention document title
Appears on the browser window
<body>
</body>
Tag that keeps other tags eg: <h1> <div> <p> etc
It so visible content on webpage.
<h1>
</h1>
Tag represents heading on webpage
<p>
</p>
Tag represents paragraph
<b></b>
Tag for bold text
<i></i>
Tag for italics
<strong></strong>
Tag displays strong text
Similar to bold
What is the largest heading <h1> to <h6>
<h1> is the largest heading
<h6> is the smallest heading
</h6></h1>
<ul>
</ul>
Unordered list, bullet pints
Each point starts with <li>
<ol>
</ol>
Ordered list, each item begins with a number and <li>
<img></img>
<img scr=“url” alt=“sometext” style=“width:width;height=height”>
<img scr=“html5.gif” alt=“HTML5” style=“width:128px;height=128px”>
Hyperlinks
Alow visitors to navigate between websites by sticking words or phrases and images
<a href=“url”>link text</a>
What is CSS
A design language that can make a web page more presentable. controlling the colour, font style, spacing between paragraphs, how columns are sized and laid out etc
What’s does CSS stand for
Cascading Style Sheets.
Why CSS?
• Formatting instructions separated from document mark-up
• HTML can be more clean and well-structured
• Adding and editing content is easier
• Style sheet handles formatting automatically
• Consistent styles across a set of pages
• Different style sheets can be used for the same content
• CSS offers much richer formatting than HTML
• Browsers that do not support CSS can still use the page
• Recommended, standard way of formatting HTML documents
• CSS Separates Content from Form
Advantages of CSS
- makes website more flexible:
CSS is reusable. Change style sheet to change design of many pages
-easier to maintain
Cleaner HTML code
Separates style from HTML tags and page content
Considers look across entire website that is easily maintained by changing style in one place.
Disadvantages of CSS
Not informally supported by all browsers
Firefox, chrome ,safari adhere to CSS standards more than IE
What are the three parts of a style rule.
- selector, the tag where the style will be applied. Eg : h1 or p
-property the type of attribute of HTML tag.
Eg: colour border etc
-value eg red etc
H1{font-size:x-large;colour:red}