Today I have learned Footer in javascript
Footer in javascript:
Definition and Usage
The <footer> tag defines a footer for a document or section.
A <footer> element typically contains:
- authorship information
- copyright information
- contact information
- sitemap
- back to top links
- related documents
You can have several <footer> elements in one document.
Tips and Notes
Tip: Contact information inside a <footer> element should go inside an <address> tag.
- Copy your header and footer code to header.txt and footer.txt files and then just add this code to your JavaScript file. Don't forget to: include JavaScript file to those pages where you want to show header and footer. check path for header and footer txt files. You can also add header and footer code to separate JavaScript files as you like.
- import React, { Component } from "react";export default class Footer extends Component {constructor(props){super(props);this.state={}}render(){return (<div style={{backgroundColor:"skyblue"}}><div className="row"><div className="col-lg-3 col-md-6 col-sm-6"><div><h1>HOME</h1><h4>Vehicle</h4></div></div><div className="col-lg-3 col-md-6 col-sm-6"><div><h1>About</h1><h4>vegtable</h4></div></div><div className="col-lg-3 col-md-6 col-sm-6"><div><h1>Contact Us</h1><h4>Fruits</h4></div></div><div className="col-lg-3 col-md-6 col-sm-6"><div><h1>Services</h1><h4>Cars</h4></div></div></div></div>)}}
- </div><Footer/><div class="mb-3"><label for="pwd" class="form-label">Password:</label><input type="password" class="form-control" placeholder="Enter password" value={this.state.password} onChange={(e) =>this.setState({ password: e.target.value})}/><button onClick={this.postcall} class="btn btn-info">Submit</button></div>
- Output:
Comments
Post a Comment