HTML & CSS

HTML

HTML: (Hyper Text Markup Language) a standardized system for tagging text files to achieve font, color, graphic, and hyperlink effects on World Wide Web pages.

Elements: HTML elements are the building blocks of a HTML page. An HTML element is defined by a start tag, some content, and an end tag (<tagname>content goes here <tagname>)

Attribute: HTML attributes are a modifier of an HTML element type. An attribute either modifies the default functionality of an element type or provides functionality to certain element types unable to function correctly without them. In HTML syntax, an attribute is added to an HTML start tag. Attributes are always defined in the start tag.

Tags

HTML: The tag shows up at the beginning and end of an HTML document (know as the root element). it indicates that the webpage is written in HTML5, and all other page markup comes in between these beginning and ending tags.

Head: the head element is a container for metadata (data about data) and is placed between the html tag and the body tag. Metadata is data about the HTML document. Metadata is not displayed. Metadata typically define the document title, character set, styles, scripts, and other meta information.

Body: The body tag defines the document’s body. The body element contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc. Note: There can only be one body element in an HTML document.

Script: The script tag is used to embed a client-side script (JavaScript). The script element either contains scripting statements, or it points to an external script file through the src attribute. Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.

CSS

CSS: CSS stands for Cascading Style Sheets. CSS describes how HTML elements are to be displayed on screen, paper, or in other media. CSS saves a lot of work. It can control the layout of multiple web pages all at once. External stylesheets are stored in CSS files.

Each CSS rule is made up of 3 elements: Selector, Property and Value.

Selector: The selector points to the HTML element you want to style. (body, .card, #myElement)

Property: This part of the rule determines which attribute of the element will change. (width, height, opacity, font-color)

Value: this part of the rule sets the value of the property. (12px, 5em, blue)

selectors