HTML and CSS Fundamentals Review
STRUCTURE
•The <!DOCTYPE html> declaration should always be the first line of code
in your HTML files.
•The <html> element will contain all of your HTML code.
•Information about the web page, like the title, belongs within the <head>
of the page.
•You can add a title to your web page by using the <title> element,
inside of the head.
•Code for visible HTML content will be placed inside of the <body> element
COMMON ELEMENTS
•You can add headings of different sizes using the different headings
elements: <h1> through <h6>.
•Paragraphs are added with the <p> element.
•Unordered lists are created with the <ul> element and list items are
added using the <li> element.
•Ordered lists are created with the <ol> element and list items are added
using the <li> element.
•You can add links to your web page using the <a> element - don't forget
the href attribute!
•Images can be added with the <img> element - don't forget the src
attribute!
•Images help support visually impaired users when <img> elements
include the alt attribute.
•You can turn anything into a link by wrapping it with an <a> element.
•White space in the HTML file does not affect the positioning of elements
in the browser.
•The W3C recommends 2 spaces of indentation for nested HTML
elements.
•Comments are used to take notes inside of an HTML file. You can add a
comment with <!-- This is a comment -->.