answersLogoWhite

0


Best Answer

I reccommend using consistent ID's on all of the tags that you plan to manipulate in your HTML. Example: <table id="table1"> <tr> <td>Table Toggle</td> <tr> </table> <a href="javascript:document.getElementById('table1').style.visibility='visible';"> Show </a> <br><br> <a href="javascript:document.getElementById('table1').style.visibility='hidden';"> Hide </a>

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you show and hide content with CSS and JavaScript?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What languages can a browser understand?

HTML, CSS, &amp; JavaScript.


Can you hide and reveal text e.g YouTube comments without the use of javascript I wanted to try it on Myspace but it disables javascript.?

Very unlikely. See, Javascript is used to change the className attribute of the text node. When the className has changed, the node uses the properties that are set with CSS. This means you can keep a text invisible with CSS only, but you'll always need Javascript to switch classes.


What language is used to write websites?

The most common languages used to write websites are HTML, CSS, and JavaScript. HTML is used for structuring the content, CSS for styling and design, and JavaScript for adding interactivity and behavior to the website.


How can you disable clicks with CSS?

You don't disable clicks with CSS. That takes a more active language like JavaScript, JQuery, Ajax, PHP, etc.. You can hide any text/image link those with one of these CSS properties: visibility: hidden; display: none;


What is the content property in CSS?

It is used in javascript and HTML. This is a command that adds something new to a webpage. It uses the commands :after and :before. Web designers will use this frequently.


How do you use javascript in css document?

JavaScript is primarily used for adding interactivity and dynamic behavior to web pages and is not typically embedded directly in CSS documents. However, you can use JavaScript to manipulate CSS properties and styles dynamically. Here's how JavaScript interacts with CSS: Changing CSS Properties Dynamically: JavaScript can be used to change the CSS properties of HTML elements dynamically. For example, you can change an element's color, size, position, or visibility based on user interactions or other events. This is often done using the style property of HTML elements. CSS Classes and Styles: JavaScript can add or remove CSS classes from HTML elements, which can trigger predefined styles. This is a common approach for creating dynamic effects or animations. Inline Styles: JavaScript can set inline styles directly on HTML elements. While not typically recommended for larger-scale applications, this approach is useful for quick, small changes. CSS Transitions and Animations: JavaScript can be used to trigger CSS transitions and animations based on events. This allows you to create smooth animations and interactive effects. HTML: Responsive Design: JavaScript can be used to change CSS styles dynamically based on various factors, like screen size or user preferences, enabling responsive web design. In summary, JavaScript and CSS are closely related and work together to create dynamic and interactive web experiences. While JavaScript is not directly embedded within CSS files, it is used to manipulate and control CSS properties and styles on HTML elements dynamically. and if you are looking for the JavaScript Online Training then, my suggestion is to contact Croma Campus. For more information contact :- +91-9711526942


What programming language is used for webOS applications?

HTML5, JavaScript, CSS


How does you call javascript file in css?

In your HTML add in the tags


Is it necessary to learn css to learn javascript?

yes its necessarry to learn css basis .... refer w3c shool css tutorials.. all the best


What all computer languages are involved in web designing?

The primary languages are HTML, CSS and JavaScript. HTML is the markup used to structure your content. CSS is used to make the structure pretty. JavaScript is used to make the pretty structure do neat things. There are a bunch of other languages like PHP, ASP, JSP that work with MySQL or other databases...


Html css javascript php etc charts and cheat sheets. Linkz please?

HTML: http://www.w3schools.com/tags/default.asp CSS: http://www.w3schools.com/css/css_reference.asp JavaScript: http://www.w3schools.com/jsref/default.asp PHP: http://www.php.net/manual/en/


What is the difference between css and javascript?

CSS (Cascading Style Sheets) is used to make your site look better by for example positioning your content and giving it a nice layout. Javascript is used for creating a dynamic website. You can make interaction with it, like for example an alert that pops up when pressing a button, a question prompt that asks you what your name is to set a cookie after that so the site remembers what your name is, creating a small game... There is a very large variation of things you can do with Javascript.