Creating a Web Page
Creating a Web Page
- Web pages are created using a combination of various coding languages and frameworks
- A web page forms part of a website and displays content for user interaction
- The process of creating a web page includes structuring, styling, and adding interactive behaviour
Structuring a Web Page
- HTML (Hyper Text Markup Language) is the core language used to structure a web page
- An HTML document starts with a DOCTYPE declaration that instructs the browser about the version of HTML
- This is followed by an HTML tag which contains all other HTML elements
- The HTML document is split into HEAD and BODY sections
- The head section includes metadata about the document, while the body section contains the content that will be rendered on the web page
Styling a Web Page
- CSS (Cascading Style Sheets) is a stylising language used to enhance the appearance of a web page
- CSS can control aspects such as layout, colors, fonts, and more
- CSS rules can be added inline with HTML, in the HEAD of the HTML document, or in an external file
- The style is applied based on a selector that targets specific HTML elements
- CSS follows a cascading nature, meaning styles can inherit or override other styles
Adding Interactivity to a Web Page
- JavaScript is a scripting language used to add interactive behaviour to a web page
- It can be used to manipulate HTML content, handle events, create animations, validate form inputs, and provide dynamic content
- JavaScript code can be written inline with HTML, in the HEAD or the BODY of an HTML document, or separately in an external file
- JavaScript interacts with HTML elements through the DOM (Document Object Model)
Publishing a Web Page
- A web page is published to the web by uploading it to a web server
- A domain name needs to be registered and linked to the web server
- The web page can then be accessed over the Internet using the unique domain name
Remember: Constructing a web page requires a balance of structure (HTML), style (CSS), and interactive behaviour (JavaScript).